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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>SCOPE API Demo</title> | |
<link rel="stylesheet" media="screen" href="css/style.css" /> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"></script> | |
<script type="text/javascript" src="js/backbone.poller.min.js"></script> |
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
conn() { | |
( | |
echo "host \t 22 \t 3306 \t 8010" | |
for host in "$@" | |
do | |
echo -en "\n$host \t" | |
nc -w 2 -z $host 22 && echo -n "Y" || echo -n "N" | |
echo -en "\t" | |
nc -w 2 -z $host 3306 2>&1 && echo -n "Y" || echo -n "N" | |
echo -en "\t" |
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
x_clone() { | |
SRC_HOST=${${1#*@}%/*} | |
SRC_USER=${${1%@*}%:*} | |
SRC_PASS=${${1%@*}#*:} | |
SRC_DATA=${${1#*/}} | |
DEST_HOST=${${2#*@}%/*} | |
DEST_USER=${${2%@*}%:*} | |
DEST_PASS=${${2%@*}#*:} | |
DEST_DATA=${${2#*/}} |
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
class Dashing.Alert extends Dashing.Widget | |
ready: -> | |
onData: (data) -> | |
@accessor 'isHigh', -> | |
@get('level') in ['SEVERE', 'CRITICAL'] |
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
mcp() { | |
for i in mysqldump xargs pv; do | |
[[ ! -x `which $i 2>/dev/null` ]] && echo "$i is required to run." && return 1 | |
done | |
_usage() { | |
echo "Usage: [--f/--n] user:pass@serverA/databaseA user:pass@serverB/databaseB [table]"; | |
} | |
if [ $1 ]; then |
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
#!/usr/bin/env bash | |
[[ ! -f 'config.sh' ]] && echo "'config.sh' not found. Create from config.sh.example." && exit | |
source config.sh | |
CURRENT_PATH=$(dirname $0) | |
SCHEMA_DIR=$CURRENT_PATH/structure | |
MIGRATION_DIR=$CURRENT_PATH/migrations | |
LOG_DIR=$CURRENT_PATH/logs |
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
require 'coffee-script/register' | |
gulp = require 'gulp' | |
coffee = require 'gulp-coffee' | |
gutil = require 'gulp-util' | |
jasmine = require 'gulp-jasmine' | |
watch = require 'gulp-watch' | |
gulp.task 'build', -> | |
gulp.src('./src/*.coffee') |
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
switch-site() { | |
if [[ $HOST == *gon* ]] then | |
SWITCH=${HOST/gon/gye} | |
else | |
SWITCH=${HOST/gye/gon} | |
fi | |
LBUFFER="ssh $SWITCH" | |
zle accept-line | |
} | |
zle -N switch-site |
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
q() { | |
/bin/mysql --unbuffered --skip-column-names --raw -A -B -e "$@" | |
} | |
images() { | |
( | |
for i in {1..$(q "select MAX(photoid) from photos")}; \ | |
echo -n $i && q "select photo from photos where photoid=${i}" | magick - info:- | |
) | sort -h -k 7 | tail -n 10 | |
} |
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
source ~/Sandbox/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
source ~/Sandbox/zsh-history-substring-search/zsh-history-substring-search.zsh | |
source ~/Sandbox/zsh-autosuggestions/autosuggestions.zsh | |
fpath=(~/Sandbox/zsh-completions/src $fpath) | |
bindkey '^[[A' history-substring-search-up | |
bindkey '^[[B' history-substring-search-down | |
zle-line-init() { |
OlderNewer