based on rage-quit support for bash
Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck
Also chmod a+x
the flip
command.
curl $(cat url) | pup 'a[href^="magnet:"] attr{href}' | aria2c -i - |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
based on rage-quit support for bash
Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck
Also chmod a+x
the flip
command.
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Because loading gems can take longer than you think
$ curl -fsSL https://gist.github.com/jherdman/5025684/raw/a3ccd4b5308723245706b4ae315845fe951b4473/benchmark.rb | ruby
............................................................[DONE]
Gem Time(sec) Pct %
--------------------------------------------------
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
run_locally("bundle exec rake assets:precompile") | |
servers = find_servers_for_task(current_task) | |
port_option = port ? " -e 'ssh -p #{port}' " : '' | |
servers.each do |server| | |
run_locally("rsync --recursive --times --rsh=ssh --compress --human-readable #{port_option} --progress public/assets #{user}@#{server}:#{shared_path}") | |
end |
#!/usr/bin/env ruby | |
require 'benchmark' | |
REGEXPS = [ | |
/^no such file to load -- (.+)$/i, | |
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i, | |
/^Missing API definition file in (.+)$/i, | |
/^cannot load such file -- (.+)$/i, | |
] |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
http://www.agileweboperations.com/chef-rvm-ruby-enterprise-edition-as-default-ruby | |
http://www.christophersamuelson.com/2010/10/22/chef-rvm-capistrano-bundler/ | |
http://blog.ninjahideout.com/posts/a-guide-to-a-nginx-passenger-and-rvm-server | |
http://brandontilley.com/2011/01/29/serving-rails-apps-with-rvm-nginx-unicorn-and-upstart.html | |
http://brandontilley.com/2011/01/29/rvm-unicorn-and-upstart.html | |
Chef workflow | |
# Install cookbook from opscode community site. (Automatically commits to local repo) | |
knife cookbook site install <COOKBOOK_NAME> |
cd /tmp | |
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm | |
rpm -Uhv rpmforge-release*.rf.i386.rpm | |
yum install readline-dev htop |