Skip to content

Instantly share code, notes, and snippets.

@hikerpig
hikerpig / ssh_to.sh
Created December 29, 2014 09:09
Setup a ssh session that can utilize the remote server's clipboard.
PORT=5566
ssh_server='ubuntu@crmdev'
# using mac
if [[ -n `which pbcopy` ]]; then
echo "@Mac"
copy_command='pbcopy'
elif [[ -n `which xsel` ]]; then
echo "you can use xsel on ubuntu"
copy_command='xsel'
@hikerpig
hikerpig / require_formatter.vim
Created May 23, 2014 08:55
Coffeescript require formatter vim plugin
" Prettify coffee require statement
" Maintainer: asnowwolf<[email protected]>
" Last Change: 2014-01-01
if exists("g:loaded_require_formatter")
finish
endif
let g:loaded_require_formatter = 1
function s:format()
* { background-color: rgba(255,0,0,.2); }
* * { background-color: rgba(0,255,0,.2); }
* * * { background-color: rgba(0,0,255,.2); }
* * * * { background-color: rgba(255,0,255,.2); }
* * * * * { background-color: rgba(0,255,255,.2); }
* * * * * * { background-color: rgba(255,255,0,.2); }
@hikerpig
hikerpig / 0_reuse_code.js
Created April 22, 2014 02:28
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
@hikerpig
hikerpig / qiandao_casper.coffee
Last active May 22, 2017 14:40
用casperjs暴力签到虾米。
utils = require('utils')
fs = require('fs')
casper = require("casper").create(
verbose: true
logLevel: "warning" # 想看更详细的log的话可以改成"debug"
pageSettings:
loadImages: false
loadPlugins: false
userAgent: "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0"