原创 mongo 導入json文件
mongoimport --db xxxx --collection xxxx --type json xxxx.json --jsonArray Export JSON File: mongoexport --db
原创 APP版本升級,服務端API設計
1 客戶端請求的API版本和服務器端API版本不是一一對應的 2 客戶端請求的API版本可能爲1.0, 1.1, 2.0, 2.1…… 而服務器端最多維護3個大版本,比如 1.x, 2.x, 3.x,當超過三個版本,則廢棄掉最低的版
原创 Centos 簡單的安全設置
1 新建linux用戶: 1) 新建用戶 useradd fedor 2) 設置密碼 passwd fedor 3) 賦予用戶權限 EDITOR=vi visudo 找到下面這一行, 並去掉# # %wheel ALL=(A
原创 Linux 如何禁止用戶登錄
兩種方式: 使用命令usermod 禁止帳號myuser登錄 usermod -L myuser 允許賬號登錄 usermod -U myuser 修改shell類型 chsh myuser -s /sbin/nologin
原创 webstorm vuejs 警告“default export is not declared in imported module”
首先啓用webstorm es6語法 eslint –init 執行自定義的語法檢查 警告“default export is not declared in imported module“, Editor->Inspecti
原创 mysql 5.7 To log in you must change it using a client that supports expired passwords
mysql 報錯: To log in you must change it using a client that supports expired passwords 1 mysql -u root -p 2 mysql> SE
原创 CryptoJS & JAVA AES加密、解密
link: https://github.com/mpetersen/aes-example
原创 GitHub error “Failed to get HEAD”
cd /directory git init git add . git commit -m “Name of Repo”
原创 linux mongodb 安裝、自啓動
可以使用root用戶進行mongodb的管理(啓動、停止…),但對於追求卓越的人來說,我們新非root用戶管理mongo更好。 在linux下創建用戶、修改密碼 useradd mongod passwd mongod ...
原创 Centos6 install mysql
參考文章:http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ Error: 1 Fatal error: Can't open and lock privilege table
原创 Mongoose 移除unique的限制
Mongoose 移除unique的限制 程序中email最開始設置了unque限制,導致email在此collection中無法重複插入,現在想要移除unique限制。 db.your_collection.dropIndexe
原创 Sublime Text 3 支持的熱門插件推薦
1 最常用的插件: 代碼提示、代碼檢查、代碼格式化...的介紹:http://www.moomn.com/archives/68 2 語法檢查插件:SublimeLinter安裝方法: http://gaohaoyang.github.
原创 Linux 安裝Git Server
搭建Git服務器需要準備一臺運行Linux的機器, 我用的Centos 2創建一個git用戶,用來運行git服務: sudo adduser git 3 用git用戶登錄,創建ssh key 文件夾 $ su git $ cd $
原创 npm 安裝 canvas報錯:package cairo was not found in the pkg-config search path
OSX 上npm安裝canvas, 報錯:package cairo was not found in the pkg-config search path, 這種問題的解決辦法,一般上直接啓用xcode工具: xcode-
原创 centos forever node 開機自啓動
1 進入 /etc/init.d, 新建文件 nodeserver(名字可以隨便取) cd /etc/init.d touch nodeserver 2 編輯nodeserver #!/bin/sh # chkconfig: 2345