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
ipset -N tor iphash | |
wget -q https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$MY_IP -O - | sed '/^#/d' |while read IP | |
do | |
ipset -q -A tor $IP | |
done | |
iptables -A INPUT -m set --match-set tor src -j DROP |
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
ruby '2.3.0' | |
source 'http://rubygems.org' | |
gem 'sidekiq' | |
gem 'fog' | |
gem 'mime-types' |
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
/* ### Transitions between Sections ##################################################################### */ | |
(function() { | |
// detect if IE : from http://stackoverflow.com/a/16657946 | |
var ie = (function(){ | |
var undef,rv = -1; // Return value assumes failure. | |
var ua = window.navigator.userAgent; | |
var msie = ua.indexOf('MSIE '); | |
var trident = ua.indexOf('Trident/'); | |
if (msie > 0) { |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails' | |
gem 'arel' | |
gem 'rack' | |
gem 'i18n' | |
gem 'sqlite3' | |
gem 'destroyed_at' | |
GEMFILE |
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
[{"id":100,"type":"hotel","title":"Hotel in London","start":"2014-10-02","end":"2014-10-05","url":"/en/trips/9/hotels/100/edit","editable":false,"backgroundColor":"#e4d3eb","borderColor":"#e4d3eb","textColor":"#000","className":"trip-hotel trip-item-100"}] |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'rack', github: 'rack/rack' | |
gem 'i18n', github: 'svenfuchs/i18n' | |
gem 'public_activity', github: 'pokonski/public_activity' | |
gem 'sqlite3' | |
GEMFILE |
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
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'rack', github: 'rack/rack' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' |
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
# Code before: | |
resources :messages do | |
resources :comments | |
end | |
resources :posts do | |
resources :comments | |
resources :images, only: :index | |
end |
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 'date' | |
require 'time' | |
require 'active_support/all' | |
p_inf = 1.0 / 0.0 | |
n_inf = -1.0 / 0.0 | |
class Date | |
def <=> (other) | |
conversion = :"to_#{self.class.name.downcase}" |
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 'date' | |
require 'time' | |
require 'active_support/all' | |
p_inf = 1.0 / 0.0 | |
n_inf = -1.0 / 0.0 | |
module InfiniteComparable | |
extend ActiveSupport::Concern |
NewerOlder