This file contains hidden or 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 ruby | |
| require 'webrick' | |
| server = WEBrick::HTTPServer.new( | |
| :Port => ARGV.first || 8666, | |
| :DocumentRoot => Dir::pwd | |
| ) | |
| trap 'INT' do server.shutdown end | |
| server.start |
This file contains hidden or 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 @Params | |
| constructor: (@queryString) -> | |
| @queryString or= window.location.search?.substr 1 | |
| @queryString.split('&').forEach @addValue | |
| addValue: (ps) => | |
| pv = ps.split "=" | |
| @[pv[0]] = pv[1] |
This file contains hidden or 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
| mongo <dbname> --eval "db.dropDatabase()" |
This file contains hidden or 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
| for item in $(find . -type f -name '*.log' ) ;do cat /dev/null > $item ;done |
This file contains hidden or 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
| echo start `date` >> /home/xbmc/lumix.log | |
| /home/xbmc/bin/flickr-shell-uploader -r /media/LUMIX >> /home/xbmc/lumix.log | |
| echo end `date` >> /home/xbmc/lumix.log |
This file contains hidden or 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
| git config --global instaweb.httpd webrick | |
| git config --global instaweb.browser google-chrome |
This file contains hidden or 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
| " General "{{{ | |
| set nocompatible " be i\;Mproved | |
| " set timeoutlen=500 " Time to wait after ESC (default causes an annoying delay) | |
| set shell=/bin/zsh | |
| set nowritebackup | |
| set directory=/tmp// " prepend(^=) $HOME/.tmp/ to default path; use full path as backup filename(//) | |
| set noswapfile |
This file contains hidden or 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
| fs = require 'fs' | |
| {exec} = require 'child_process' | |
| appFiles = [ | |
| # omit src/ and .coffee to make the below lines a little shorter | |
| 'app' | |
| 'models/thing' | |
| 'view/window' | |
| ] |
This file contains hidden or 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
| #!/bin/sh | |
| TFILE=`tempfile -s .html` | |
| echo '<link href="https://gist.github.com/stengland/5065514/raw/markdown.css" rel="stylesheet" type="text/css" />' >> $TFILE | |
| marked $1 >> $TFILE && | |
| xdg-open $TFILE |
This file contains hidden or 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
| html { | |
| font-size: 14px; | |
| line-height: 1.6; | |
| font-family: helvetica,arial,freesans,clean,sans-serif; | |
| color: black; | |
| } | |
| h1 { | |
| margin: 15px 0; | |
| padding-bottom: 2px; | |
| font-size: 24px; |