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
### Keybase proof | |
I hereby claim: | |
* I am joshprice on github. | |
* I am joshprice (https://keybase.io/joshprice) on keybase. | |
* I have a public key whose fingerprint is 08EA 0ACE 6A62 A852 259B 743C 6749 8211 1E02 CE56 | |
To claim this, I am signing this object: |
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 Array | |
def to_hash | |
Hash[self] | |
end | |
end |
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
⚡ hg verify | |
checking changesets | |
checking manifests | |
crosschecking files in changesets and manifests | |
checking files | |
data/.TAGS.i@417: missing revlog! | |
417: empty or missing .TAGS | |
.TAGS@417: 64e9244a76f6 in manifests not found | |
.TAGS@442: 28d1b1b79d61 in manifests not found | |
.TAGS@443: 4a5a2e285db3 in manifests not found |
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
grey='\e[0;90m' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$grey%}(" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$grey%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$grey%})" | |
function pat_prompt { | |
(( spare_width = ${COLUMNS} )) | |
prompt=" " |
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
helpers do | |
def mobile_request? | |
[ /AppleWebKit.*Mobile/, /Android.*AppleWebKit/ ].any? {|r| request.env['HTTP_USER_AGENT'] =~ r} | |
end | |
def mobile_file(name) | |
File.exist?("#{options.views}/#{name}#{@mobile}.haml") ? :"#{name}#{@mobile}" : name.to_sym | |
end | |
def partial(name) | |
haml mobile_file("_#{name}"), :layout => false | |
end |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<style> | |
.wrapper { border: 1px solid black; } | |
.wrapper h3 a { float: right; } | |
</style> | |
<!--[if lte IE 7]> | |
<style> |
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
javascript:(function(){var%20j=document.createElement('script');j.setAttribute('type','text/javascript');j.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js');document.body.appendChild(j);})(); |
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
require "rubygems" | |
require "webrick/httpproxy" | |
module WEBrick | |
class HTTPRequest | |
attr_writer :host, :port, :request_uri, :unparsed_uri, :request_line, :path | |
end | |
end | |
class MultiplexingProxy < WEBrick::HTTPProxyServer |
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
(function() { | |
var controlPanel = (<r><![CDATA[ | |
<div id='controlpanel'> | |
<h1>First</h1> | |
<ul> | |
<li>HappyPath</li> | |
</ul> | |
<h1>Second</h1> |
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
// | |
// Define this.constructor.name so we can introspect an object for it's constructor's name | |
// (equivalent to the 'Class' name if there were classes...) | |
// This is necessary because IE does not define this constructor property but FF does. | |
// | |
Function.prototype.getName = function() { | |
var matches = this.toString().match(/function\s+([\w\$]+)\s*\(/); | |
return matches ? matches[1] : ''; | |
}; |
NewerOlder