Skip to content

Instantly share code, notes, and snippets.

View utensil's full-sized avatar

Utensil utensil

  • 18:25 (UTC +08:00)
View GitHub Profile
@utensil
utensil / mv.js
Last active August 29, 2015 13:59
batch rename tool
var shelljs = require('shelljs');
var fs = require("fs");
var path = require("path");
var root = process.argv[2];
if(!root)
{
console.log("root is not specified");
process.exit();
@utensil
utensil / numenta-nupic-pull-751-empty-env.md
Last active August 29, 2015 13:58
numenta-nupic-pull-751-empty-env.md , related to https://github.com/numenta/nupic/pull/751
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ echo $NUPIC                                                                                                                                         
 
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ echo $NTA                                                                                                                                           
 
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ export REPOSITORY=`pwd`
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ mkdir $REPOSITORY/build_system
mkdir: cannot create directory ‘/home/utensilsong/projects/DavidRagazzi/nupic/build_system’: File exists
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ 

Clone and setup

utensilsong@vm-1:~/projects$ git clone https://github.com/numenta/nupic.git
Cloning into 'nupic'...
remote: Reusing existing pack: 42087, done.                                                                                                                                                         
remote: Total 42087 (delta 0), reused 0 (delta 0)                                                                                                                                                   
Receiving objects: 100% (42087/42087), 116.27 MiB | 5.64 MiB/s, done.
Resolving deltas: 100% (24113/24113), done.

Clone and setup

utensilsong@vm-1:~/projects/DavidRagazzi$ git clone https://github.com/DavidRagazzi/nupic.git

utensilsong@vm-1:~/projects/DavidRagazzi$ cd nupic                                                                                                                                                
utensilsong@vm-1:~/projects/DavidRagazzi/nupic$ export REPOSITORY=`pwd`
@utensil
utensil / unusual_characters.md
Created February 7, 2014 10:12
识别生僻字

识别生僻字

GB2312

字最少的汉字编码,里面的也就是最常用的。在这个字符集里的不可能是生僻字。

辨别方式:

@utensil
utensil / awk1line.txt
Created January 28, 2014 12:18
HANDY ONE-LINERS FOR AWK
HANDY ONE-LINERS FOR AWK 22 July 2003
compiled by Eric Pement <[email protected]> version 0.22
Latest version of this file is usually at:
http://www.student.northpark.edu/pemente/awk/awk1line.txt
USAGE:
Unix: awk '/pattern/ {print "$1"}' # standard Unix shells
DOS/Win: awk '/pattern/ {print "$1"}' # okay for DJGPP compiled
@utensil
utensil / 0_reuse_code.js
Created October 30, 2013 15:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@utensil
utensil / gist:5730348
Created June 7, 2013 16:00
`rake test ` middleman fails on Windows, locale=GBK.zh_cn
rake.bat : u:/Ruby192/bin/ruby.exe -S rake test
所在位置 行:1 字符: 5
+ rake <<<< test > rake_test.log 2>&1
+ CategoryInfo : NotSpecified: (u:/Ruby192/bin/ruby.exe -S rake test:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
No examples found.
Finished in 0 seconds
0 examples, 0 failures