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
| # ICB Protocol | |
| Last Modified: Sat Aug 4 01:19:36 PDT 2001 by [[email protected]][1] | |
| [1]: mailto:[email protected] | |
| ## Basic Packet Layout: | |
| The basic unit ICB clients and server communicate with is a packet with the | |
| following layout: |
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
| def disable_rubygems; nil; end | |
| def source(s); $src = s unless s[/gemcutter/] end | |
| def gem(n, v) | |
| if Hash === v | |
| $stderr.puts "ignoring git gem #{n}" | |
| return | |
| end | |
| puts "#{n} -v#{v}#{$src ? " -s#{$src}": ""}" | |
| end | |
| load ARGV[0] || "Gemfile" |
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 | |
| # Best To-Do List. Ever. | |
| # | |
| # Usage: | |
| # 1. Add a new item to list: `todo This needs to be fixed` | |
| # 2. Edit the to-do list: `todo -e` | |
| # 3. Show the current to-do's: `todo` | |
| if [[ $1 ]]; then | |
| if [ $1 = "-e" ]; then |
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 "rack/client" | |
| require "rack/cache" | |
| require "rack/test" | |
| app = Rack::Builder.new { | |
| use Rack::Cache, | |
| :verbose => true, | |
| :metastore => "heap:/", | |
| :entitystore => "heap:/" | |
| run Rack::Client |
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 io | |
| date := Date now asString("%Y-%m-%d %H:%M:%S") | |
| wifi := File clone openForReading("/proc/net/wireless") readLines \ | |
| at(2) split at(5) removeAt(2) asString | |
| mpd := method( | |
| File clone openForReading("/home/simon/.mpd/state") foreachLine(i, line, | |
| parts := line split(":") | |
| if(parts at(0) == "state", state := parts at(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
| #!/bin/awk -f | |
| # md2html.awk | |
| # by: Jesus Galan (yiyus) <yiyu.jgl@gmail>, May 2009 | |
| # Usage: | |
| # md2html file.md > file.html | |
| # Options: -v esc=false to not escape html | |
| function newblock(nblock){ | |
| if(text) |
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 "test/unit" | |
| require "rack/test" | |
| require "contest" | |
| require "sinatra/base" | |
| class MyApp < Sinatra::Base | |
| set :environment, :test | |
| get "/" do | |
| "Hi, #{params["name"]}." |
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 "rubygems" | |
| require "integrity" | |
| class Refresher | |
| JS = <<-EOS | |
| <script type="text/javascript"> | |
| //<![CDATA[ | |
| setTimeout('location.reload()', %s * 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
| module Rack | |
| module Test | |
| module Session | |
| attr_reader :last_response | |
| attr_reader :last_request | |
| alias_method :response, :last_response | |
| alias_method :request, :last_request | |
| def initialize(app) |
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 bash | |
| cat <<EOF | |
| <entry> | |
| <title>Omnifaria $1</title> | |
| <published>$(date --utc)</published> | |
| <updated>$(date --utc)</updated> | |
| <content type="xhtml"><div>$(cat | ./src/markdown)</div></content> | |
| </entry> | |
| EOF |