I hereby claim:
- I am dcadenas on github.
- I am dcadenas (https://keybase.io/dcadenas) on keybase.
- I have a public key ASAZotTtny79SxzwfBbCE4ST3pl63YtUo3Pnj5oOpOj32go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
(function(){ | |
var url = 'https://api.ipify.org/?format=json'; | |
var createCORSRequest = function(method, url) { | |
var xhr = new XMLHttpRequest(); | |
if ("withCredentials" in xhr) { | |
xhr.open(method, url, true); | |
} else if (typeof XDomainRequest != "undefined") { | |
xhr = new XDomainRequest(); | |
xhr.open(method, url); | |
} else { |
#!/usr/bin/env bash | |
a=( | |
'En cuanto arreglemos el goteo de recursos' | |
'En cuanto completemos las pruebas' | |
'En cuanto hayamos optimizado el código' | |
'Apenas nos arreglen el bug' | |
'Cuando se solvente el problema de instalación' | |
'Cuando averiguemos por qué se cae el proceso' | |
'Cuando hayamos mejorado el rendimiento' | |
'En cuanto completemos la restauración' |
require 'objspace' | |
ObjectSpace.trace_object_allocations_start | |
def all_child_threads | |
Thread.list - [Thread.current] | |
end | |
trap(:INFO) { | |
puts "#" * 90 | |
all_child_threads.each do |t| |
#!/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() { |
### 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') |
#!/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 |
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) -> |
#!/bin/env bash | |
# ~/bin/githelpers | |
pivotal_commit() { | |
git commit -m "$@ [#$GIT_PIVOTAL_NUM]" | |
} | |
pivotal_commit_and_finish() { | |
git commit -m "$@ [Finishes #$GIT_PIVOTAL_NUM]" | |
} |
SomeComponent { | |
background-color: red; | |
SomeComponent-someDescendant { | |
width: 100%; | |
} | |
} | |
SomeComponent-someDescendant { | |
background-color: white; |