Skip to content

Instantly share code, notes, and snippets.

Ideas for menu items at an english lit themed brunch place
named Breakfast at Tiffany's:
Truman Blueberry Compote Pancakes
Catcher Eggs in the Rye
The Unbearable Lightness of Bacon
The Glass Meneggerie
Gender Rolls with Judith Butter
Lord of the Onion Rings
Love in the Time of Collard Greens
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
function superprompt {
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
export PS1="\[\e]2;\u@\h\a[\[\e[37;44;1m\]\t\[\e[0m\]]$RED\$(parse_git_branch) \[\e[32m\]\W\[\e[0m\] \$ "
PS2='> '
//Newly needed function
var war_switch_function = function(e){
window.location = '/wars/embed/neocon/?war_id='+e.target.value.split('/')[2];
// Talk about disproportionate...
// //unbind to prevent double firing
// $('#war_selector select').unbind('change');
// $(document).unbind('/cast_vote');
//
//
// $(document).trigger('/load_war', {
# include this in application controller
module Authentication
protected
# Inclusion hook to make #current_user and #signed_in?
# available as ActionView helper methods.
def self.included(base)
base.send :helper_method, :current_user, :signed_in?, :authorized? if base.respond_to? :helper_method
end
# Returns true or false if the user is signed in.
development: &global_settings
database: textual_development
host: 127.0.0.1
port: 27017
test:
database: textual_test
<<: *global_settings
production:
*/5 * * * * cd /home/deploy/www/dp_neocon/current/ && /usr/local/bin/lockrun --lockfile=/tmp/detweeter.lockrun -- /usr/local/bin/rake RAILS_ENV=production detweeter
*/5 * * * * /usr/local/bin/lockrun --lockfile=/tmp/detweeter.lockrun -- cd /home/deploy/www/dp_neocon/current/ && /usr/local/bin/rake RAILS_ENV=production detweeter
class ActionController::CgiRequest
def search_bot?
self.user_agent =~ /(Baidu|bot|Google|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg|Jeeves|ms)/i
end
end
SlideTweet = function(){
// setTimeout(function(){
// }, 2000)
$("li:last").slideUp({
duration: 320,
complete: function(){$(this).remove()}
})
};