jrom
I hereby claim:
- I am jrom on github.
- I am jrom (https://keybase.io/jrom) on keybase.
- I have a public key ASDS-TzWEf6vEmKDv_aDjpRTh8xvOKVyWxLpLr8EJyHorAo
To claim this, I am signing this object:
jrom
I hereby claim:
To claim this, I am signing this object:
namespace :datamodel do | |
desc 'Generates data model in erd.pdf' | |
task :generate do | |
#say 'Loading application environment...' | |
Rake::Task[:environment].invoke | |
require 'rails_erd/diagram/graphviz' | |
#say 'Loading all models...' | |
Rails.application.eager_load! | |
::Rails::Engine.subclasses.map(&:instance).map {|e| e.class.eager_load!} |
var local_hash = window.location.hash.substr(1), | |
hash_value = local_hash.substr(local_hash.indexOf(key + '=')).split('&')[0].split('=')[1], | |
Data = {}; | |
// Once OAuth handshake is done, we'll be redirected with a hash string in the location that we'll use to extract the token | |
if (hash_value) { | |
Data.access_token = hash_value; | |
call_api("organizations", {}, function (data) { | |
console.log(data); // Here you have your organizations |
sudo cat /var/log/nginx/access.log | cut -f 9 -d" " | sort | uniq -c |
# /etc/ssh/sshd_config | |
TCPKeepAlive yes | |
ClientAliveInterval 15 | |
ClientAliveCountMax 5 |
screen # Starts a screen session | |
<C-a d> # Detaches from the screen session | |
screen -r # Reattaches to a detached session | |
screen -S paco # Starts a screen session called "paco" | |
screen -r paco # Reattaches to a detached session called "paco" |
# Ported from https://github.com/jzaefferer/jquery-validation/blob/master/jquery.validate.js | |
creditcard = (value) -> | |
# accept only spaces, digits and dashes | |
if /[^0-9 \-]+/.test(value) | |
return false | |
nCheck = 0 | |
nDigit = 0 | |
bEven = false |
def remove_failed_jobs_if(&block) | |
i = 0 | |
while i < Resque::Failure.count | |
job = Resque::Failure.all(i) | |
if yield job | |
Resque::Failure.remove(i) | |
else | |
i += 1 | |
end | |
end |
plugin.onMessageInsertion = function (event) { | |
var content; | |
content = Talker.getLastInsertion().replace(/:[\w_+]+:/g, function (match) { | |
var emoji = match, | |
filename = (emoji == ':+1:' ? ':plus1:' : emoji).replace(/:/g, ''); | |
return "<img class=\"emoji\" title=\"" + emoji + "\" alt=\"" + emoji + "\" height=\"20\" width=\"20\" align=\"absmiddle\" src=\"https://teambox.com/assets/emojis/" + filename + ".png\">" | |
}); | |
return content; | |
}; |
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |