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 | |
| # Check the status of the network connection. | |
| # Thanks to grnmtn on Freenode for this script! | |
| # | |
| # *0* return value indicates the network connection is active. No guarantees on | |
| # the quality of the connection, or if the Internet works. We just have a cable | |
| # in our ass, and it's on. | |
| # | |
| # non-zero return values indicate there was an error somewhere in this script. |
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
| evaryont | metaphor wars: GO! | |
| rson | i've said it before and i'll say it again, even CLEAN ruby code looks like | |
| someone took perl and some shell language and mixed them up in a pot, then overcooked them. | |
| evaryont | rson: and python doesn't look like the illegeimate baby of pascal and cobol? | |
| cactus | i imagine ruby as.. perl that some young girl got ahold of, and put sparkles | |
| and makeup on. |
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
| # put this in ~/.zshrc | |
| # No alias needed! The `whence -p` does a path search. | |
| function ruby() { [[ "$1" == "" ]] && irb || `whence -p ruby` $@ } |
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
| # Open dmenu to select a user agent | |
| bind ZU = spawn $XDG_DATA_HOME/uzbl/scripts/switch_useragent.sh | |
| # Immediately switch to the user agent, bypassing dmenu. | |
| bind ZI = spawn $XDG_DATA_HOME/uzbl/scripts/switch_useragent.sh "iPhone" | |
| bind ZA = spawn $XDG_DATA_HOME/uzbl/scripts/switch_useragent.sh "Android (G1) Browser" |
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
| evaryont Is it just me or is github.com/*/ resulting in GithubPages saying "Page does not exist!" gist.github.com works, but no subfolders work under github.com/ | |
| evaryont No matter what URL I try accessing under github.com/, it always results in a github pages non existent error | |
| @defunkt evaryont: like what url, for example? | |
| bringo i ain't not getting no 404s | |
| evaryont defunkt: ah, sorry, github.com/blog/ or github.com/evaryont/ | |
| evaryont it's weird as hell, I realize, and my desktop works just fine >_< | |
| bringo strange. those URLs produce perfectly fine results for me. | |
| bringo i blame Echelon | |
| context evaryont: try clearing your cache? | |
| context make sure you are not using ie? |
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 'looksee' | |
| module Kernel | |
| alias_method :orig_methods, :methods | |
| def methods(*args) | |
| if caller.first =~ /\(irb\):\d+:in `irb_binding'/ | |
| Looksee.lookup_path(self, *args) | |
| else | |
| orig_methods |
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
| # s gem install twitter | |
| Your Password: | |
| Building native extensions. This could take a while... | |
| Building native extensions. This could take a while... | |
| ERROR: Error installing twitter: | |
| rack requires thin (>= 0, development) | |
| # s gem install thin | |
| ERROR: Error installing thin: | |
| thin requires rack (>= 1.0.0, runtime) | |
| # s gem install rack |
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/ruby | |
| require 'twitter' | |
| require 'pp' | |
| oauth = Twitter::OAuth.new('key', 'secret'); | |
| rtoken = oauth.request_token.token | |
| rsecret = oauth.request_token.secret | |
| puts "> redirecting you to twitter to authorize..." |
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
| # Subject: Re: Newbie to Sinatra looking for example | |
| # From: Ryan Tomayko <[email protected]> | |
| # To: [email protected] | |
| # Content-Type: text/plain; charset=UTF-8 | |
| # | |
| # > Alright, so I'm pretty new to both Sinatra and web applications, and I | |
| # > was wondering if someone could write up a quick example use of | |
| # > Sinatra. Basically I want to see how Sinatra handles <form>s in one | |
| # > view, and then shows the input on a different view. | |
| # > |
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/ruby | |
| require 'rubygems' | |
| require 'twitter_oauth' | |
| @@config = YAML.load_file("config.yml") rescue nil || {} | |
| @client = TwitterOAuth::Client.new( | |
| :token => @@config[:token], | |
| :secret => @@config[:secret] | |
| ) | |
| if @client.authorized? |