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
// ==UserScript== | |
// @name GitHub Dashboard Twitter | |
// @namespace http://tekkub.net/ | |
// @include https://github.com/ | |
// ==/UserScript== | |
$("div.news h1").before( | |
$("<div>").attr("id", "twitter_div2").append( | |
$("<h1>").text("GitHub status ").css({ |
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
cookie = 'XXX--YYY' | |
ActiveSupport::MessageVerifier.new(Rails.application.config.secret_token).verify(cookie) |
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 ParallelProcessor | |
attr_accessor :pid_params | |
def initialize | |
@pid_params = {} | |
end | |
def spawn_worker(start, finish, writer) | |
pid = fork do | |
puts "worker working on #{start} to #{finish}" |
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
#!/usr/bin/env bash | |
set -e | |
cd ~/repos/spree | |
bundle install --quiet 1> /dev/null || bundle update --quiet | |
bundle exec rake sandbox |
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
# from https://gist.github.com/jordan-brough/fc085fa50f520ef022c9 | |
# inspired by http://emergencycompliment.com/ | |
function emergency_compliment { | |
ruby <<RUBY | |
require "rubygems" | |
require "json" | |
today = Time.now.strftime('%Y-%m-%d') | |
today_filename = "/tmp/compliments-#{today}.json" | |
latest_filename = "/tmp/compliments-latest.json" | |
json = if File.exist?(today_filename) |
NewerOlder