Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
'use strict'; | |
const OutgoingMessage = require('http').OutgoingMessage; | |
'use strict'; | |
const Benchmark = require('benchmark'); | |
const benchmarks = require('beautify-benchmark'); | |
const suite = new Benchmark.Suite(); |
'use strict'; | |
var swig = require('swig'); | |
var expect = require('expect.js'); | |
describe('test', function() { | |
var compileFn = function(compiler, args, content, parents, options, blockName) { | |
return ';_output += "<div"' + JSON.stringify(args) + '+">";' + compiler(content, parents, options, blockName) + ';' + '_output += "</div>";'; | |
}; |
//http://www.cnblogs.com/52cik/p/js-hide-code.html | |
(function(window) { | |
var rep = { // 替换用的数据,使用了4个零宽字符,数据量减少了一半。 | |
'00': '\u200b', | |
'01': '\u200c', | |
'10': '\u200d', | |
'11': '\uFEFF' | |
}; | |
function hide(str) { |
➜ test git:(master) ✗ iojs -v | |
v2.0.1 | |
➜ test git:(master) ✗ node -v | |
v2.0.1 | |
➜ test git:(master) ✗ npm -v | |
2.9.0 | |
➜ test git:(master) ✗ npm install scrat | |
> fis-sass@3.1.3 install /Users/tz/tmp/test/node_modules/scrat/node_modules/fis-parser-sass/node_modules/fis-sass | |
> node build.js |
cd ~/Library/Application\ Support/WebStorm9/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx | |
echo '#!/bin/sh | |
# | |
# Reveal a directory in the Terminal. | |
# | |
# The script takes one argument, the qualified name of a directory. | |
# | |
# Note that the script is necessary because osascript before osx 10.4 could not | |
# pass arguments. |
load plugin!!! [larva-command-release] error : Cannot find module 'larva-command-release' | |
load plugin!!! [scrat-command-release] error : Cannot find module 'scrat-command-release' | |
[DEBUG] 15:12:09.0668 revert cache | |
[DEBUG] 15:12:09.0669 cache file exists | |
[DEBUG] 15:12:09.0669 cache info read | |
[DEBUG] 15:12:09.0669 cache is valid |
/** | |
* format date. | |
* | |
* formatDate(new Date(),"yyyy-MM-dd hh:mm:ss") | |
* formatDate(new Date().setHours(0,0,0,0),"yyyy-MM-dd hh:mm:ss") | |
* | |
* 更建议用类库: [moment.js](http://momentjs.com/) | |
* | |
* @param {Date/Number} [obj] date to format, support Date or timestamp | |
* @param {String} [format] 格式 |