Useful commands:
TODO: rearrange this to bottom = oldest and top = newst (2-27-2020) below dashed line
ln -f -s $(/bin/ls -t tmux_resurrect_*.txt | head -n 1) last
// Expose modules in ./support for demo purposes | |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'); | |
// Edit /etc/vhosts |
$graph = {a: [:b, :c], b: [:d, :e], c: [:f, :g]} | |
def dfs_nr(node) | |
queue = [node] | |
seen = {} | |
while queue.size > 0 | |
node = queue.pop | |
puts node | |
seen[node] = true | |
if $graph[node] |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# enable forward search | |
# http://ruslanspivak.com/2010/11/25/bash-history-incremental-search-forward/ | |
# https://bugs.launchpad.net/ubuntu/+source/bash/+bug/80635/comments/12 | |
stty -ixon |
[user] | |
name = William <REDACTED> | |
email = <REDACTED> | |
[color] | |
ui = true | |
branch = true | |
diff = true | |
status = true | |
log = true | |
[alias] |
#!/bin/bash | |
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done; | |
/Applications/p4merge.app/Contents/Resources/launchp4merge "${absargs[@]}" | |
#!/bin/sh | |
PRIVATE_TOKEN="YOU_SECRET_TOKEN" | |
GITLAB_URL="http://gitlab.example.com/" | |
URL=`git config --get remote.origin.url` | |
PROJECT=`basename ${URL} .git | cut -d':' -f2` | |
COMMIT_MSG="git log -1 HEAD" | |
COMMIT_HASH_MSG=`git log -1 HEAD | head -1` |
class SomeMailer | |
class Helper | |
include ActionView::Helpers # rails standard helpers | |
include HelpfulMethodsHelper # for some function i_wrote | |
end | |
def helper | |
@@h ||= Helper.new | |
end | |
# fucking shit activesupport or rvm or whoever's fault it is | |
if file.include?('active_support/krypt') | |
puts '' | |
puts "changing include of file #{file} due to wrong path" | |
file.gsub!("/Users/#{user_name}/.rvm/gems/jruby-1.7.3/gems/activesupport-3.2.13/lib/active_support/",'') | |
puts "path changed to: #{file}" | |
puts '' | |
end |
// make all links in iframes open in a new page | |
jQuery('iframe').contents().find('a').each(function(){ | |
jQuery(this).attr("target", "_blank"); | |
}); |