Skip to content

Instantly share code, notes, and snippets.

View dcadenas's full-sized avatar

Daniel Cadenas dcadenas

View GitHub Profile
@dcadenas
dcadenas / gist:9102336
Created February 19, 2014 21:45
Git + pivotal tooling
#!/bin/env bash
# ~/bin/githelpers
pivotal_commit() {
git commit -m "$@ [#$GIT_PIVOTAL_NUM]"
}
pivotal_commit_and_finish() {
git commit -m "$@ [Finishes #$GIT_PIVOTAL_NUM]"
}
@dcadenas
dcadenas / gist:566434ba0af9f3eabb07
Created July 23, 2014 21:10
A directive to deal with angular's problem when using $location and anchor links
myApp = angular.module('myApp')
#Ensures that:
# 1) all links contained in the directive's element that are not handled
# by angular do a full page reload bypassing html5mode.
# 2) all anchor links are prefixed with the current url so that the base
# path doesn't interfere
myApp.directive 'externalLinks', ->
link: (scope, element, attrs, controller) ->
#!/usr/bin/env bash
[[ $# -gt 0 ]] || { echo "Usage: $(basename $0) remoteport localport"; exit 1; }
autossh -M 0 -v -nNT4 -o "TCPKeepAlive no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 1" -o "ExitOnForwardFailure yes" -R $1:localhost:$2 vps
@dcadenas
dcadenas / capybara_cheatsheet.rb
Created November 6, 2014 13:49
Capybara Cheatsheet
### 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_on('Link Text') # clicks on either links or buttons
click_on('Button Value')
@dcadenas
dcadenas / missing_heroku_config_vars
Created June 6, 2015 01:37
Shows ENV vars in the Rails app that can't be found in the heroku config
#!/bin/bash
echo "These ENV variables only exist in the rails app but not in the heroku config"
echo
envs_in_rails() {
git grep "ENV\[" | sed "s/.*ENV\[['\"]\(.*\)['\"]\].*/\1/" | sort | uniq
}
envs_in_heroku() {
#Alternative to the use of aliasing
#This is one more alternative to what can be found here: http://blog.jayfields.com/2006/12/ruby-alias-method-alternative.html
module ClockRadioClassExtensions
module ClockRadioInstanceExtensions
def on!
super
@display_time = true
end
Información del orador:
Los interesados en contribuir con conferencias o talleres deben enviar la siguiente información:
* Autores: Nombre completo y resumen curricular
Evan Henshaw-Plath
* Público Objetivo: (Gerentes, Desarrolladores, Administradores de Sistemas)
Gerentes & Desarrolladores
Información del orador:
Los interesados en contribuir con conferencias o talleres deben enviar la siguiente información:
* Autores: Nombre completo y resumen curricular
Evan Henshaw-Plath
* Público Objetivo: (Gerentes, Desarrolladores, Administradores de Sistemas)
Desarrolladores
Información del orador:
Los interesados en contribuir con conferencias o talleres deben enviar la siguiente información:
* Autores: Nombre completo y resumen curricular
Evan Henshaw-Plath
* Público Objetivo: (Gerentes, Desarrolladores, Administradores de Sistemas)
Desarrolladores & Gerentes
Información del orador:
Los interesados en contribuir con conferencias o talleres deben enviar la siguiente información:
* Autores: Nombre completo y resumen curricular
Evan Henshaw-Plath
* Público Objetivo: (Gerentes, Desarrolladores, Administradores de Sistemas)
Desarrolladores