This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1234622225).toLocaleString("zh-Hans-CN-u-nu-hanidec")//firefox下输出 "1,234,622,225" IE与chrome下输出 "一,二三四,六二二,二二五" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var Iconv = require('iconv').Iconv; | |
var iconv = new Iconv('GBK', 'UTF-8//TRANSLIT//IGNORE'); | |
request.get('http://foo.bar', {encoding:null}, function(e, r, body) | |
{ | |
console.log(iconv.convert(body).toString()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin/mongo | |
use test; | |
db.dropDatabase(); | |
db.mytable.drop(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm --recursive <foldername> -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://github.com/supermarin/Alcatraz/blob/master/Scripts/install.sh | |
#!/bin/sh | |
DOWNLOAD_URI=https://github.com/supermarin/Alcatraz/releases/download/1.0.4/Alcatraz.tar.gz | |
PLUGINS_DIR="${HOME}/Library/Application Support/Developer/Shared/Xcode/Plug-ins" | |
mkdir -p "${PLUGINS_DIR}" | |
curl -L $DOWNLOAD_URI | tar xvz -C "${PLUGINS_DIR}" | |
echo "Alcatraz successfuly installed!!1!🍻 Please restart your Xcode." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fuser -n tcp 12004 | |
sudo kill 9358 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo ln <oriFilePath> /usr/bin/<quickname> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo chown -R $USER /usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//macos | |
brew update | |
brew doctor | |
sudo chown -R $USER /usr/local | |
brew install ImageMagick | |
//ubuntu | |
apt-get install ImageMagick | |
brew link libtool | |
//liunx |
OlderNewer