Skip to content

Instantly share code, notes, and snippets.

View filiptepper's full-sized avatar
🏠
Working from home

Filip Tepper filiptepper

🏠
Working from home
View GitHub Profile
@filiptepper
filiptepper / Gemfile
Created August 22, 2014 09:10
Conditional Gemfile
source 'https://rubygems.org/'
if ENV['DEVELOPMENT'] == '1'
gem 'rails', '4.0.0'
else
gem 'rails', '4.1.0'
end

Keybase proof

I hereby claim:

  • I am filiptepper on github.
  • I am filiptepper (https://keybase.io/filiptepper) on keybase.
  • I have a public key whose fingerprint is 7D03 390A 7356 8A3C 04DC 756A 2246 B32A E1FB 997F

To claim this, I am signing this object:

sudo gem uninstall memcached
sudo env ARCHFLAGS="-arch x86_64" gem install memcached
require "erb"
require "redis"
module Rack
class Out
DEFAULTS = { :secret => "secretive-secret", :key => "rack:out",
:host => "127.0.0.1", :port => 6379, :db => 0, :timeout => 5, :password => nil,
:logger => nil, :thread_safe => nil }
def initialize(app, options = {})
module Punycode
module Status
class Error < StandardError; end
class PunycodeSuccess; end
# Input is invalid.
class PunycodeBadInput < Error; end
# Output would exceed the space provided.
class PunycodeBigOutput< Error; end
# Input needs wider integers to process.
class PunycodeOverflow < Error; end
rails_env = ENV['RAILS_ENV'] || "production"
rails_root = ENV['RAILS_ROOT'] || "/var/www/yourapp/current"
num_workers = 1
num_workers.times do |num|
God.watch do |w|
w.name = "resque-#{num}"
w.group = 'resque'
w.interval = 30.seconds
w.start = "cd #{rails_root} && env QUEUE=* RAILS_ENV=#{rails_env} /usr/bin/rake -f #{rails_root}/Rakefile environment resque:work"
zstyle ":completion:*" use-cache on
zstyle ":completion:*" cache-path ~/.zsh/cache
require "rubygems"
require "sinatra"
require "oauth"
require "oauth/consumer"
enable :sessions
before do
session[:oauth] ||= {}
class Redis
def get(key)
call_command [:get, key]
end
end
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script>
function start(){
localStorage['script'] = '';
window.odswierzaj = false;
chrome.browserAction.setBadgeText({text: ""});
window.bliplogin = localStorage['bliplogin'];
window.bliphaslo = localStorage['bliphaslo'];
window.dzialanie = localStorage['dzialanie'];