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
| require 'eventmachine' | |
| require 'faye' | |
| require 'faye/redis' | |
| client = Faye::Client.new(Faye::Server.new({ | |
| engine: { | |
| type: Faye::Redis | |
| # non-default redis connection config here | |
| } | |
| })) |
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 "sid=0\nsid=1" | ruby -rzlib -e 'puts Zlib::Deflate.deflate(STDIN.read).length' | |
| 19 | |
| $ echo "sid=0\nsid=0" | ruby -rzlib -e 'puts Zlib::Deflate.deflate(STDIN.read).length' | |
| 18 |
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
| <script> | |
| <!-- | |
| //<script></script> not displayed | |
| --> | |
| //<script></script> displayed | |
| </script> | |
| <br /> | |
| <script> | |
| <!-- | |
| var a,b; |
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
| # ps1 | |
| if true; then | |
| OFF="\[\033[0m\]" | |
| BLACK="\[\033[0;30m\]" | |
| RED="\[\033[0;31m\]" | |
| GREEN="\[\033[0;32m\]" | |
| YELLOW="\[\033[0;33m\]" | |
| BLUE="\[\033[0;34m\]" | |
| MAGENTA="\[\033[0;35m\]" | |
| CYAN="\[\033[0;36m\]" |
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
| file_length_history() { | |
| export filename="$1" | |
| ( | |
| echo set xlabel \"Days Ago\" | |
| echo set ylabel \"Bytes\" | |
| echo plot \"-\" title \"$filename\" with lines | |
| now=$(date +"%s") | |
| git log --reverse --format=format:"%at %H" "$filename" | \ | |
| while read -a line; do | |
| echo -en "$(echo scale=10\; \(${line[0]} - $now\) / 24 / 60 / 60 | bc)\t" |
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
| var SYSTEM = require('system'), | |
| HTTP = require('http-client'), | |
| OS = require('os'); | |
| var url = SYSTEM.args[1]; | |
| if (!url) { | |
| print('usage:'); | |
| print('js ' + SYSTEM.args[0] + ' <fileformat.info URL>'); | |
| OS.exit(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
| (function() { | |
| // ==UserScript== | |
| // @name Google Code Search Improver | |
| // | |
| // @include http://google.com/codesearch/* | |
| // @include http://www.google.com/codesearch/* | |
| // @include https://google.com/codesearch/* | |
| // @include https://www.google.com/codesearch/* | |
| // |
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
| _XMLHttpRequest = XMLHttpRequest; | |
| XMLHttpRequest = function () { | |
| Object.defineProperty(this, | |
| "__onreadystatechange", | |
| {value: null, | |
| writable: true, | |
| enumerable: false}); | |
| Object.defineProperty(this, | |
| "onreadystatechange", |
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
| require 'rubygems' | |
| require 'fileutils' | |
| dir = File.dirname(File.expand_path(__FILE__)) | |
| $LOAD_PATH.unshift(File.join(dir, 'lib')) | |
| $LOAD_PATH.unshift(dir) | |
| require 'gollum' | |
| NUM_PAGES=1000 |
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
| $ mvn -N install | |
| [INFO] Scanning for projects... | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] Building ANTLR Master build control POM | |
| [INFO] task-segment: [install] | |
| [INFO] ------------------------------------------------------------------------ | |
| [INFO] [buildnumber:create {execution: default}] | |
| [INFO] Storing buildNumber: Sep 25, 2010 22:48:12 at timestamp: 1285480092481 | |
| [INFO] Executing: /bin/sh -c cd /Users/paul/Documents/Work/280North/static/antlr && svn --non-interactive info | |
| [INFO] Working directory: /Users/paul/Documents/Work/280North/static/antlr |
NewerOlder