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
def append_info_to_payload(payload) | |
super | |
payload[:remote_ip] = request.remote_ip | |
payload[:user_id] = current_user.try(:id) | |
payload[:organization_id] = current_organization.try(:id) | |
payload[:app] = current_organization.name | |
payload[:referer] = request.referer.to_s | |
payload[:request_id] = request.uuid | |
payload[:user_agent] = request.user_agent | |
payload[:xhr] = request.xhr? ? 'true' : 'false' |
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
version: '2' | |
services: | |
app: | |
command: bash -c "rm -f tmp/pids/server.pid && bundle install --path /bundle && bundle exec rails s -p 3000 -b '0.0.0.0'" | |
build: | |
context: . | |
args: | |
rails_env: development | |
volumes: | |
- .:/code |
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 "https://www.rubygems.org" | |
ruby '2.2.4' | |
gem 'byebug' | |
gem 'capybara' | |
gem 'selenium-webdriver' |
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
function agile_setAccount(b, a) { | |
agile_id.set(b, a); | |
agile_setEmailFromUrl() | |
} | |
function agile_setEmailFromUrl() { | |
if (window.location.href.search("fwd=cd") !== -1) { | |
try { | |
var a = decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURI("data").replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1")); | |
if (a) { |
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
IPFS Barcelona hack day | |
 | |
libP2P | |
github.com/IPFS/specs | |
github.com/IPFS/pm | |
Download and install ipfs | |
Ipfs init |
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
ENV['RAILS_ENV'] = 'test' | |
require './config/environment' | |
require 'rspec/rails' | |
require 'capybara-webkit' | |
require 'vcr' | |
VCR.configure do |c| | |
c.cassette_library_dir = 'fixtures/vcr_cassettes' | |
c.hook_into :webmock |
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
https://kickass.to/the-troll-hunter-i1740707/ | |
https://kickass.to/the-innkeepers-i1594562/ | |
https://kickass.to/sinister-i1922777/ | |
https://kickass.to/the-evil-dead-i0083907/ | |
https://kickass.to/v-h-s-i2105044/ | |
https://kickass.to/the-descent-i0435625/ | |
https://kickass.to/splinter-i1031280/ | |
https://kickass.to/el-espinazo-del-diablo-i0256009/ | |
https://kickass.to/paranormal-activity-i1179904/ | |
https://kickass.to/the-pact-i2040560/ |
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
# Copied from http://www.codeship.io/documentation/continuous-deployment/deployment-to-elastic-beanstalk/ | |
#!/bin/sh | |
export APP_VERSION=`git rev-parse --short HEAD` | |
pip install awscli | |
# clean build artifacts and create the application archive (also ignore any files named .git* in any folder) | |
git clean -fd | |
# precompile assets, ... |
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
# gem install fullcontact pry gibbon | |
# Setup these fields at mailchimp: FNAME, LNAME, TWITTER, FACEBOOK, GITHUB, LOCATION, GENDER. | |
# Usage: ruby mailchimp_full_contact.rb MAILCHIMP_LIST_NAME | |
require "rubygems" | |
require "fullcontact" | |
require "pry" | |
require 'gibbon' |
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 SomeController < ApplicationController | |
helper_method :collection | |
def index | |
@collection = Article.all | |
end | |
def collection | |
@decorated_collection ||= ArticlesDecorator.new(@collection) |