start new:
tmux
start new with session name:
tmux new -s myname
# WAIT! Do consider that `wait` may not be needed. This article describes | |
# that reasoning. Please read it and make informed decisions. | |
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/ | |
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations? | |
describe 'Modal' do | |
should 'display login errors' do | |
visit root_path |
# see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version | |
# see https://github.com/defunkt/resque/issues/49 | |
# see http://redis.io/commands - new commands | |
namespace :resque do | |
desc "Clear pending tasks" | |
task :clear => :environment do | |
queues = Resque.queues | |
queues.each do |queue_name| | |
puts "Clearing #{queue_name}..." |
module AllowGzipInflating | |
def initialize(m, reqbody, resbody, uri_or_path, initheader = nil) | |
super | |
@header["accept-encoding"] = [] if @decode_content | |
end | |
end | |
class Net::HTTPGenericRequest | |
prepend AllowGzipInflating | |
end |
# docker build -t="rails" . | |
FROM ubuntu:12.04 | |
RUN apt-get update | |
## MYSQL | |
RUN apt-get install -y -q mysql-client libmysqlclient-dev | |
## RUBY |
// 1. Go to page https://www.linkedin.com/settings/email-frequency | |
// 2. You may need to login | |
// 3. Open JS console | |
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
// 4. Copy the following code in and execute | |
// 5. No more emails | |
// | |
// Bookmarklet version: | |
// http://chengyin.github.io/linkedin-unsubscribed/ |
FROM ubuntu:12.04 | |
MAINTAINER Nicolas BERNARD <nikkau@nikkau.net> | |
# Ruby | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 | |
RUN echo deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu precise main > /etc/apt/sources.list.d/brightbox.list | |
# NodeJS (Assets pipeline) | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C7917B12 | |
RUN echo deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu precise main > /etc/apt/sources.list.d/nodejs.list |
This gist is old. Check out http://gijs.github.io/blog/2014/09/09/docker-and-service-discovery/ |
#!/bin/bash | |
# The script does automatic checking on a Go package and its sub-packages, including: | |
# 1. gofmt (http://golang.org/cmd/gofmt/) | |
# 2. goimports (https://github.com/bradfitz/goimports) | |
# 3. golint (https://github.com/golang/lint) | |
# 4. go vet (http://golang.org/cmd/vet) | |
# 5. race detector (http://blog.golang.org/race-detector) | |
# 6. test coverage (http://blog.golang.org/cover) | |
set -e |