These rules are adopted from the AngularJS commit conventions.
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
rails c | |
require 'sidekiq/api' | |
Sidekiq::Queue.all | |
mailers = Sidekiq::Queue.new("mailers") | |
mailers.size | |
mails.each {|job| job.inspect } | |
mailers.each { |job| job.delete if job.jid == 'asdf' } | |
mailers.latency | |
mailers.find("asdf2") | |
mailers.clear |
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://rubygems.org' | |
gem 'sidekiq' | |
gem 'rack' | |
gem 'sinatra' |
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
# worker.rb | |
require 'sidekiq' | |
Sidekiq.configure_client do |config| | |
config.redis = {db: 1 } | |
end | |
Sidekiq.configure_server do |config| | |
config.redis = {db: 1 } | |
end |
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
### Keybase proof | |
I hereby claim: | |
* I am lyosha85 on github. | |
* I am aktg (https://keybase.io/aktg) on keybase. | |
* I have a public key ASA-6j5OeDQMGKQT7bMxrfd5KnsUVyut9QY1sObLThkG0go | |
To claim this, I am signing this object: |
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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get update | |
# If running older version of ubuntu | |
## remove unused kernels | |
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')") | |
sudo apt-get dist-upgrade | |
sudo apt-get install update-manager-core |
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
VPS | |
=== | |
root# apt-get update | |
root# apt-get upgrade | |
root# adduser deployer | |
root# gpasswd -a deployer sudo | |
root# nano /etc/ssh/sshd_config | |
root# PermitRootLogin no |
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
require "spec_helper" | |
describe ExampleController do | |
context "GET #index" do | |
let(:resources) { FactoryGirl.create_list(:resource) } | |
before do | |
get :index | |
end |
NewerOlder