Install with apt-get
$ sudo apt-get update
$ sudo apt-get install letsencrypt
$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
| var allParrots = document.querySelectorAll("[data-emoji-name]"); | |
| for(var i =0; i < allParrots.length; i++){ | |
| var d = allParrots[i]; | |
| if(d.dataset.emojiName.indexOf('parrot') !== -1) { | |
| d.click(); | |
| $(".btn_danger").click(); | |
| } | |
| } |
| bundle exec rake db:reset db:migrate db:test:prepare db:seed | |
| # This will reset your database and reload your current schema. | |
| ### OR ### | |
| bundle exec rake db:drop db:create db:migrate db:test:prepare db:seed | |
| # This will destroy your db, recreate it, and then migrate your current schema. |
| fields = [:switch, :sha_ind, :dtdm, :utdm, :ttdm, :actual] | |
| def create_struct name, fields | |
| Struct.new(name, *fields) | |
| end | |
| def create_singleton_struct name, fields | |
| if Struct::const_defined? name | |
| Struct.const_get name | |
| else |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| require 'rubygems' unless defined? Gem # rubygems is only needed in 1.8 | |
| def unbundled_require(gem) | |
| loaded = false | |
| if defined?(::Bundler) | |
| Gem.path.each do |gems_path| | |
| gem_path = Dir.glob("#{gems_path}/gems/#{gem}*").last | |
| unless gem_path.nil? | |
| $LOAD_PATH << "#{gem_path}/lib" |