-
git stash
保存当前的工作进度。会分别对暂存区和工作区的状态进行保存
-
git stash save "message..."
这条命令实际上是第一条 git stash
命令的完整版
var fs = require('fs'); | |
var crypto = require('crypto'); | |
var path = '/target/file.data'; | |
var start = new Date().getTime(); | |
var md5sum = crypto.createHash('md5'); | |
var stream = fs.createReadStream(path); | |
stream.on('data', function(chunk) { | |
md5sum.update(chunk); | |
}); |
/** | |
* Get a random floating point number between `min` and `max`. | |
* | |
* @param {number} min - min number | |
* @param {number} max - max number | |
* @return {float} a random floating point number | |
*/ | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
set number | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
Bundle 'gmarik/vundle' | |
"my Bundle here: |
const fs = require('fs'); | |
fs.watchFile('./test.txt', function (cur, pre) { | |
if (!pre.isFile() && cur.isFile()) { | |
console.log('==>file created'); | |
} | |
else if (pre.isFile() && !cur.isFile()) { | |
console.log('==>file deleted'); | |
} | |
else if (pre.isFile() && cur.isFile() && Date.parse(pre.mtime) !== Date.parse(cur.mtime)) { |
/* | |
*@desc randPassword 生成随机密码 | |
*@params {Object} -option | |
*@params {Number} -option.len 密码长度,默认8位 | |
*@params {Boolean} -option.special 是否包含特殊字符,默认不包含 | |
*/ | |
function randPassword(option) { | |
let arr = ['abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1234567890', '~!@#$%^&*()_+";",./?<>']; | |
const rand = (min, max) => { | |
let num = Math.floor(Math.max(min, Math.random() * max)); |
#!/usr/bin/env groovy | |
def call(String buildResult) { | |
if ( buildResult == "SUCCESS" ) { | |
slackSend color: "good", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was successful" | |
} | |
else if( buildResult == "FAILURE" ) { | |
slackSend color: "danger", message: "Job: ${env.JOB_NAME} with buildnumber ${env.BUILD_NUMBER} was failed" | |
} | |
else if( buildResult == "UNSTABLE" ) { |
version: "2" | |
services: | |
gogs: | |
container_name: gogs | |
image: gogs/gogs | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./data/gogs/data:/data | |
environment: |
[Version] | |
Signature="$Windows NT$" | |
[DefaultInstall] | |
AddReg=SublimeText3 | |
[SublimeText3] | |
hkcr,"*\\shell\\SublimeText3",,,"用 SublimeText3 打开" | |
hkcr,"*\\shell\\SublimeText3","Icon",0x20000,"%1%\sublime_text.exe, 0" | |
hkcr,"*\\shell\\SublimeText3\\command",,,"""%1%\sublime_text.exe"" ""%%1"" %%*" |