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
#!/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 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 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 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 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 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 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 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 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 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/bash | |
play() { | |
playlist="http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_$1.m3u8" | |
echo $playlist | |
if mpc | |
then | |
mpc add $playlist | |
mpc play | |
else | |
mplayer $playlist |