Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| gist_ql() | |
| { | |
| GIST=$1 | |
| TMPFILE=~/tmp/gist_$GIST | |
| gist $GIST > ~/tmp/gist_$GIST | |
| qlmanage -c public.plain-text -p $TMPFILE >& /dev/null | |
| } |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'mechanize' | |
| MY_NAME = 'Yossef Mendelssohn' | |
| CHECKIN_REQUEST_URL = 'http://www.southwest.com/flight/retrieveCheckinDoc.html' | |
| prompt = false | |
| conf = ARGV[0] |
| require 'spec/runner/formatter/progress_bar_formatter' | |
| class NescafeFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
| def example_failed(example, counter, failure) | |
| super | |
| dump_failure(counter, failure) | |
| end | |
| end |
| #!/usr/bin/env ruby | |
| require 'csv' | |
| # This assumes: | |
| # - Ruby 1.9's CSV library, if you are using 1.8, use FasterCSV. | |
| # | |
| # https://raw.github.com/hadley/data-baby-names/master/baby-names.csv | |
| csv_fname = "baby-names.csv" |
| require 'formula' | |
| class Emacs < Formula | |
| homepage 'http://www.gnu.org/software/emacs/' | |
| url 'http://ftpmirror.gnu.org/emacs/emacs-23.4.tar.bz2' | |
| mirror 'http://ftp.gnu.org/pub/gnu/emacs/emacs-23.4.tar.bz2' | |
| md5 '070c68ad8e3c31fb3cb2414feaf5e6f0' | |
| fails_with_llvm "Duplicate symbol errors while linking.", :build => 2334 |
| >> engine = ArelBack::Engine.new(ar.connection, Arel::Visitors::MySQL) | |
| >> table = Arel::Table.new(ar.table_name, engine) | |
| >> table.project(Arel.sql('*')).to_sql | |
| => "SELECT * FROM `awesome_table` " | |
| >> |
| $(document).ready(function() { | |
| // automatically fix obfuscated email addresses pasted into | |
| // to/cc/bcc fields | |
| $("textarea[name=to], textarea[name=cc], textarea[name=bcc]") | |
| .live('blur', function(e){ | |
| var text = $(this).val(); | |
| var separators = ['_', ' ', '\\[', '\\]', '\\(', '\\)']; | |
| var separatorExp = '(' + separators.join('|') + ')+'; |
| if (-f $document_root/system/maintenance.html) { | |
| return 503; | |
| } | |
| error_page 503 @maintenance; | |
| location @maintenance { | |
| internal; | |
| if ($http_accept ~ json) { | |
| return 503 "{}"; | |
| } |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| Nature's first green is gold, | |
| Her hardest hue to hold. | |
| Her early leaf's a flower; | |
| But only so an hour. | |
| Then leaf subsides to leaf. | |
| So Eden sank to grief, | |
| So dawn goes down to day. | |
| Timezones: they're here to stay. |