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
module.exports = function (grunt) { | |
'use strict'; | |
grunt.loadNpmTasks('grunt-express'); | |
grunt.initConfig({ | |
express: { | |
options: { | |
port: 9000, | |
hostname: '*' | |
}, | |
server: { |
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
/** | |
* 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] 格式 |
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
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 |
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
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. |
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
➜ 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 |
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 derby = require('derby'); | |
var app = derby.createApp(module); | |
// import derby components | |
derby.use(require('derby-ui-boot')); | |
derby.use(require('../../ui')); | |
// ROUTES // |
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
/** | |
* format date. | |
* @param {Date/Number} obj date to format, support Date or timestamp | |
* @example | |
* formatDate(new Date(),"yyyy-MM-dd hh:mm:ss") | |
* formatDate(new Date().setHours(0,0,0,0),"yyyy-MM-dd hh:mm:ss") | |
*/ | |
function formatDate(obj,format){ | |
var date = obj; | |
if(toString.call(obj) !== '[object Date]'){ |
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
[root@etone46 node]# gdb --args out/Debug/node /usr/local/bin/npm list | |
GNU gdb Red Hat Linux (6.5-25.el5rh) | |
Copyright (C) 2006 Free Software Foundation, Inc. | |
GDB is free software, covered by the GNU General Public License, and you are | |
welcome to change it and/or distribute copies of it under certain conditions. | |
Type "show copying" to see the conditions. | |
There is absolutely no warranty for GDB. Type "show warranty" for details. | |
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1". | |
(gdb) run |
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
/** | |
* PING测试 | |
* @example | |
* var ping = require('./lib/ping'); | |
* ping('www.baidu.com',function(err,result){ | |
* console.log(result,err) | |
* }) | |
*/ | |
"use strict"; |
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
// ==UserScript== | |
// @name zhihu-favorites | |
// @namespace https://gist.github.com/4602119 | |
// @version 0.1 | |
// @description 加载并展开知乎收藏夹 | |
// @match http://www.zhihu.com/collection/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @copyright 2012+, TZ <atian25@qq.com> | |
// ==/UserScript== |
OlderNewer