Skip to content

Instantly share code, notes, and snippets.

@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@hileon
hileon / gist:1311735
Created October 25, 2011 07:39 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@ion1
ion1 / install-ghc.md
Last active December 13, 2017 21:01
Installing GHC under the home directory

Installing GHC under the home directory

  1. Install stack.
  2. Run stack setup as a normal user. This will install GHC for you (under ~/.stack).
  3. Run stack ghci to start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@fcurella
fcurella / psql.py
Created August 27, 2012 16:22
postgres PubSub vs Redis
#!/usr/bin/env python
import select
import time
import psycopg2
import psycopg2.extensions
import sys
def get_cursor():
conn = psycopg2.connect("dbname=pgpubsub")
@mattratleph
mattratleph / vimdiff.md
Last active June 21, 2024 15:33 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@jrydberg
jrydberg / supervisor.py
Created November 14, 2012 17:28
simple gevent supervisor
class UnhandledExceptionError(Exception):
"""The exception could not be handled by the supervisor."""
class SupervisorKilledError(Exception):
"""The supervisor was killed."""
class SupervisorAbortedError(Exception):
"""The supervisor gave up after maximum number of failures."""
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@yuga
yuga / gist:6612105
Last active December 23, 2015 09:09
Add support for cabal sandbox to syntastic. Write this in your .vimrc.
function! s:get_cabal_sandbox()
if filereadable('cabal.sandbox.config')
let l:output = system('cat cabal.sandbox.config | grep local-repo')
let l:dir = matchstr(substitute(l:output, '\n', ' ', 'g'), 'local-repo: \zs\S\+\ze\/packages')
return '-s ' . l:dir
else
return ''
endif
endfunction
@pascalpoitras
pascalpoitras / config.md
Last active June 6, 2024 13:09
My WeeChat configuration

WeeChat Screenshot

Mouse


enable