I hereby claim:
- I am borismacias on github.
- I am bjobim (https://keybase.io/bjobim) on keybase.
- I have a public key ASDWN6mSMKZwVmCy2gx63zmKmdg-yU-6xd4kmo3CZLqFeAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
script: | |
talk_canelita: | |
sequence: | |
- service: shell_command.talk_canelita | |
stop_talking: |
require 'shellwords' | |
ROOT_PATH = '/Users/boris/Desktop/canelita'.freeze | |
sounds = Dir["#{ROOT_PATH}/sonidos/*"] | |
loop do | |
sound = Shellwords.shellescape sounds.sample | |
puts "PLAYING #{sound}" | |
`omxplayer #{sound}` |
AllCops: | |
Include: | |
- "**/*.rake" | |
- "**/Gemfile" | |
- "**/Rakefile" | |
Exclude: | |
- "vendor/**/*" | |
- "db/**/*" | |
- "bin/**/*" | |
DisplayCopNames: false |
Running an interactive debugger (like pry) in your Docker container It takes a little extra work to get Docker to allow interactive terminal debugging with tools like byebug or pry. Should you desire to start your web server with debugging capabilities, you will need to use the --service-ports flag with the run command. ------https://blog.carbonfive.com/2015/03/17/docker-rails-docker-compose-together-in-your-development-workflow/
docker-compose run --service-ports ${SERVICE_NAME}
docker rmi $(docker images -q -f dangling=true) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T
-d postgresql
sets up the project to use PostgreSQL--skip-turbolinks
& --skip-spring
creates a project that does not use turbolinks or spring-T
skips the creation of the test directory and use of Test::Unit
// Takes a URL, param name, and data string | |
// Sends to the server.. The server can respond with binary data to download | |
jQuery.download = function(url, key, data){ | |
// Build a form | |
var form = $('<form></form>').attr('action', url).attr('method', 'post'); | |
// Add the one key/value | |
form.append($("<input></input>").attr('type', 'hidden').attr('name', key).attr('value', data)); | |
//send request | |
form.appendTo('body').submit().remove(); |