(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| require 'sidekiq/api' | |
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear |
| require 'spec_helper' | |
| # This spec was generated by rspec-rails when you ran the scaffold generator. | |
| # It demonstrates how one might use RSpec to specify the controller code that | |
| # was generated by Rails when you ran the scaffold generator. | |
| # | |
| # It assumes that the implementation code is generated by the rails scaffold | |
| # generator. If you are using any extension libraries to generate different | |
| # controller code, this generated spec may or may not pass. | |
| # |
| # 1) Create your private key | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -passout pass:x -out lvh.me.pass.key 2048 | |
| # 2) Generate RSA key | |
| $ openssl rsa -passin pass:x -in lvh.me.pass.key -out lvh.me.key | |
| # 3) Get rid of private key | |
| $ rm lvh.me.pass.key |
You can add some special notes to your source code comments in Rails to remind you later of stuff you need to do:
class Article < ActiveRecord::Base
# TODO add named_scopes
# FIXME method A is broken
# OPTIMIZE improve the code
has_many :comments
....
end
| brew install openssl | |
| brew link --force openssl | |
| gem install puma | |
| ALternatively: | |
| export CPPFLAGS="-I/usr/local/opt/openssl/include" | |
| export LDFLAGS="-L/usr/local/opt/openssl/lib" | |
| gem install puma |
http://www.transantiago.cl/restservice/rest/getpuntoparada?lat=-33.6089714&lon=-70.5742975&bip=1
http://www.transantiago.cl/predictor/prediccion?codsimt=PA420&codser=504 (código de servicio es opcional, pero el parámetro debe estar presente aunque esté vacío)
http://www.transantiago.cl/restservice/rest/getservicios/all
| require 'net/http' | |
| require 'uri' | |
| uri = URI.parse('http://www.test.com/index.php') | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| hex = (('a'..'f').to_a + ('0'..'9').to_a).sort.map { |x| x.ord } | |
| ascii = (32..127).to_a | |
| tables = '' |
| # Fixing permissions of packaged gems | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/pre/10_fixing_permission.sh": | |
| content: | | |
| #!/usr/bin/env bash | |
| # . /opt/elasticbeanstalk/containerfiles/envvars | |
| . /opt/elasticbeanstalk/support/envvars | |
| CACHE_GEM_DIR=$EB_CONFIG_APP_ONDECK/vendor/cache |