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 SvgController < ApplicationController | |
require 'active_support/secure_random' | |
def create | |
# create an SVG image | |
# based on Highcharts index.php | |
batik_path = Rails.root.to_s() + '/vendor/batik/batik-rasterizer.jar' | |
svg = params[:svg] | |
filename = params[:filename].blank? ? "chart" : params[:filename] |
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 UpdateFeeds < DJ::Worker | |
re_enqueue | |
def run_at | |
10.second.from_now | |
end | |
def perform | |
puts "HELLO!!" | |
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
source :gemcutter | |
gem "rails", ">=3.0.0" | |
gem 'rake' | |
gem 'twitter' #, :version => '0.9.4' | |
gem "loofah", :git => "git://github.com/muscardinus/loofah.git" | |
gem "feedzirra" | |
gem 'exception_notification' | |
gem 'json', '1.4.3' | |
gem 'mysql' |
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
GIT | |
remote: git://github.com/jakepaul/authlogic.git | |
revision: 44d3c8d | |
specs: | |
authlogic (2.1.5) | |
activesupport | |
GIT | |
remote: git://github.com/muscardinus/loofah.git | |
revision: aaa58cc |
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 'net/http' | |
require 'rexml/document' | |
MAPS_KEY = '' | |
UNIT = 'imperial' # or 'metric' (For us that uses the metric system) | |
states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District of Columbia', 'Florida', 'Georgia', | |
'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', | |
'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', | |
'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', |
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
$.ajaxSetup({ | |
headers: { | |
"X-CSRF-Token": $("meta[name='csrf-token']").attr('content') | |
} | |
}); |
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
cd /Library/Managed Preferences/[username] | |
sudo mv com.apple.SoftwareUpdate.plist com.apple.SoftwareUpdate.back | |
sudo touch com.apple.SoftwareUpdate.plist |
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 | |
echo "Checking for SSH key, generating one if it doesn't exist ..." | |
[[ -f ~/.ssh/id_rsa.pub ]] || ssh-keygen -t rsa | |
echo "Copying public key to clipboard. Paste it into your Github account ..." | |
[[ -f ~/.ssh/id_rsa.pub ]] && cat ~/.ssh/id_rsa.pub | pbcopy | |
open https://github.com/account/ssh | |
echo "Installing Homebrew, a good OS X package manager ..." |
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
$(document).ready(function () { | |
$('#load_fade').fadeOut(1000); | |
var currOffset = 0; | |
var itemWidth = 976; | |
var entries = $(".entry"); | |
var numProjects = entries.length; | |
$(document).keydown(function (e) { | |
var current; |
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 ruby | |
# encoding: utf-8 | |
if RUBY_VERSION.to_f < 1.9 | |
raise "You have to use ruby 1.9 or higher" | |
end | |
require 'fileutils' | |
RENAME_FILES = true |
OlderNewer