View links_gmail_and_safari.rb
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'gmail' | |
require 'nokogiri' | |
# Script to extract and show links from gmail and safari bookmarks | |
def parse_for_links s | |
results = [] | |
url = /( |^)http:\/\/([^\s]*\.[^\s]*)( |$)/ |
View goldbach.py
from sympy import sieve | |
def goldbach(): | |
''' | |
For each even number > 2, | |
it finds a pair of two primes that add up to the number | |
''' | |
even = 4 | |
View heroku_delayed_job.rb
## /config/initializers/dynamic_job.rb | |
require 'heroku' | |
# base class for all jobs that you wish to automatically scale and go down in Heroku | |
class DynamicJob | |
#set a cap on maximum number of users ever - just in case. | |
MAX_CONCURRENT_WORKERS = 100 | |
def initialize |
View Devise confirmation settings.rb
# in config/initializers/devise.rb | |
if(ENV["RAILS_ENV"]== "development") | |
config.confirm_within = 15.days | |
else | |
config.confirm_within = 0 | |
end |
View Gemfile.lock for fontawesome issue
GIT | |
remote: git://github.com/ifad/data-confirm-modal.git | |
revision: 931cab3b269c6dab301245be2b2d738b243ba169 | |
specs: | |
data-confirm-modal (1.0.2) | |
railties (>= 3.0) | |
GEM | |
remote: https://rubygems.org/ | |
specs: |
View gist:ac898e53068979b09231
Gems included by the bundle: | |
* actionmailer (4.2.3) | |
* actionpack (4.2.3) | |
* actionview (4.2.3) | |
* activejob (4.2.3) | |
* activemodel (4.2.3) | |
* activerecord (4.2.3) | |
* activesupport (4.2.3) | |
* acts-as-taggable-on (3.5.0) | |
* acts_as_commentable (4.0.2) |