Skip to content

Instantly share code, notes, and snippets.

View michaeldeol's full-sized avatar

Michael Deol michaeldeol

View GitHub Profile

Keybase proof

I hereby claim:

  • I am michaeldeol on github.
  • I am michaeldeol (https://keybase.io/michaeldeol) on keybase.
  • I have a public key ASBruuBQvJUTrSrYIKnksFS-QwtHNjNBeHJWfnWLjHP66go

To claim this, I am signing this object:

@michaeldeol
michaeldeol / demo.editorconfig
Created September 10, 2015 00:00
Demo .editorconfig
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
@michaeldeol
michaeldeol / .vimrc
Last active August 29, 2015 14:14 — forked from andyfowler/.vimrc
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence
" http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
else
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
endif

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
=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')
@michaeldeol
michaeldeol / gist:1ac0646fe60afbdc35ba
Created January 12, 2015 01:16
Uninstall all Gems
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
SELECT CONCAT(table_schema, '.', table_name),
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows,
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA,
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx,
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
ROUND(index_length / data_length, 2) idxfrac
FROM information_schema.TABLES
ORDER BY data_length + index_length DESC
LIMIT 30;
#!/usr/bin/sh
rm -rf "$HOME/Library/Preferences/WebIde80"
rm -rf "$HOME/Library/Caches/WebIde80"
rm -rf "$HOME/Library/Application Support/WebIde80"
rm -rf "$HOME/Library/Logs/WebIde80"
@michaeldeol
michaeldeol / gist:7645611
Last active December 29, 2015 08:49 — forked from istepanov/gist:3950977
Remove PHPStorm 7
#!/usr/bin/sh
rm -rf "$HOME/Library/Preferences/WebIde70"
rm -rf "$HOME/Library/Caches/WebIde70"
rm -rf "$HOME/Library/Application Support/WebIde70"
rm -rf "$HOME/Library/Logs/WebIde70"
info: Welcome to Nodejitsu scottcorgan
info: jitsu v0.12.10-2, node v0.8.21
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node app.js
info: Creating snapshot 0.1.1-3
info Uploading: [=============================] 100%
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: socket hang up