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 'zeus/rails' | |
class CustomPlan < Zeus::Rails | |
def assets_environment | |
Bundler.require(:assets) | |
ENV['RAILS_GROUPS'] = "assets" | |
end | |
def assets_run |
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
"rvm_path=/home/james/.rvm" | |
"IRBRC=/home/james/.rvm/rubies/ruby-1.9.3-p385-perf/.irbrc" | |
"rvm_prefix=/home/james" | |
"_second=2" | |
"DEFAULTS_PATH=/usr/share/gconf/XMonad.default.path" | |
"PWD=/home/james/jist-prerelease" | |
"rvm_version=1.18.21 (stable)" | |
"GEM_PATH=/home/james/.rvm/gems/ruby-1.9.3-p385-perf@njist325:/home/james/.rvm/gems/ruby-1.9.3-p385-perf@global" | |
"MY_RUBY_HOME=/home/james/.rvm/rubies/ruby-1.9.3-p385-perf" | |
"GEM_HOME=/home/james/.rvm/gems/ruby-1.9.3-p385-perf@njist325" |
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
1.9.3p385 :010 > GEM_HOME = ENV["GEM_HOME"] | |
=> "/home/james/.rvm/gems/ruby-1.9.3-p385-perf@njist325" | |
1.9.3p385 :011 > if GEM_HOME && GEM_HOME =~ %r{rvm/gems/(.+)} | |
1.9.3p385 :012?> puts $1.sub(/\/.*/, '') | |
1.9.3p385 :013?> end | |
ruby-1.9.3-p385-perf@njist325 |
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
function defaultCurrencyFromLanguage(){ | |
var lang = window.navigator.userLanguage || window.navigator.language; | |
var symbol = "$"; | |
if(/gb|uk|tr|je|ta|gs|gg|im|sd|sl|vg|cy|eg|fk|gi|lb|sh|ac|ss|sd|sy/i.test(lang)) { | |
symbol = "£"; | |
} | |
else if(/me|sk|ea|gf|tf|bl|mf|ie|ee|re|it|mc|si|de|es|at|yt|gp|pm|cy|pt|fr|gr|ic|be|ad|fi|lu|va|mt|sm|mq|nl|ax|cs/i.test(lang)) { | |
symbol = "€"; | |
} | |
else if(/cn|jp|fm|sj/i.test(lang)) { |
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
myapp.factory('Comments', function ($location) { | |
var isInitialized = false; | |
var comments = {}; | |
var getConfig = function(){ | |
var articleId = $location.path(); | |
var defaults = { | |
articleId: articleId, | |
collectionMeta: { | |
articleId: articleId, |
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
source 'https://rubygems.org' | |
ruby '2.0.0' | |
gem 'sinatra' | |
gem 'rspec' | |
gem 'rack-test' |
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 'nokogiri' | |
require 'open-uri' | |
#require 'debugger' | |
require 'cgi' | |
url = "http://www.google.co.uk/search?q=#{ARGV.join('+')}" | |
puts url | |
doc = Nokogiri::HTML(open(url)) | |
# debugger |
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
// | |
//To Track Thy Youtube Upon Google Analytics | |
//Regardless the number of Players upon thy stage | |
//Revised and Revisioned to Version 2.1 | |
//Within the March of Two Thousand and Thirteen | |
// | |
//Performed by LunaMetrics http://www.lunametrics.com @lunametrics | |
//and Sayf Sharif @sayfsharif | |
// | |
//Who beg thy forgiveness for the lack of the regular expression |
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 'nokogiri' | |
require 'open-uri' | |
require 'debugger' | |
require 'cgi' | |
url = "http://www.developerfusion.com/t/ruby/jobs/" | |
puts url | |
doc = Nokogiri::HTML(open(url)) | |
# debugger |
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
App.accordion('.accordion','.item'); | |
App.accordion = function(container,item){ | |
var item_selector = container+' '+item; | |
$(item_selector+' .header').css('cursor','pointer'); | |
$(item_selector+' .header').on('click',function(){ | |
$(this).closest(item).find('.body').slideToggle(); | |
}); | |
}; |
OlderNewer