This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def merge(lst1, lst2): | |
sorted = [] | |
iter1 = iter(lst1) | |
iter2 = iter(lst2) | |
l1_done = False | |
l2_done = False | |
val1 = lst1.next() | |
val2 = lst2.next() | |
while True: | |
if val1 < val2 or l2_done: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Default/trim_trailing_white_space.py.bak 2012-04-13 11:18:23.000000000 -0400 | |
+++ Default/trim_trailing_white_space.py 2012-04-13 11:49:48.000000000 -0400 | |
@@ -1,19 +1,37 @@ | |
-import sublime, sublime_plugin | |
+import sublime_plugin | |
-class TrimTrailingWhiteSpace(sublime_plugin.EventListener): | |
+ | |
+class TrimTrailingWhiteSpace(sublime_plugin.TextCommand): | |
+ def run(self, *args): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS "user"; | |
CREATE TABLE "user" ( | |
id serial PRIMARY KEY, | |
username varchar(256) NOT NULL, | |
email varchar(256) NOT NULL, | |
email_verified boolean DEFAULT FALSE, | |
created_on timestamp DEFAULT now(), | |
admin boolean DEFAULT FALSE | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION apply_hunks(content text[], page_id int, | |
min_revision int, max_revision int, reverse boolean DEFAULT FALSE) | |
RETURNS text[] as $$ | |
declare | |
hunk record; | |
revision int := null; | |
offset int := 0; | |
start int; | |
length int; | |
content_line text; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -U compinit promptinit colors | |
compinit | |
promptinit | |
colors | |
autoload -Uz vcs_info | |
vcs_info | |
setopt prompt_subst | |
# vim-style keybindings | |
bindkey -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone eczarny/spectacle | |
Cloning into 'spectacle'... | |
remote: Counting objects: 1634, done. | |
remote: Compressing objects: 100% (567/567), done. | |
remote: Total 1634 (delta 1033), reused 1511 (delta 923) | |
Receiving objects: 100% (1634/1634), 3.08 MiB | 817 KiB/s, done. | |
Resolving deltas: 100% (1033/1033), done. | |
$ cd spectacle | |
$ git submodule init | |
Submodule 'Frameworks/Sparkle' (git://github.com/andymatuschak/Sparkle.git) registered for path 'Frameworks/Sparkle' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/salt/client.py b/salt/client.py | |
index cd8aacf..38f8857 100644 | |
--- a/salt/client.py | |
+++ b/salt/client.py | |
@@ -69,7 +69,7 @@ class LocalClient(object): | |
''' | |
Connect to the salt master via the local server and via root | |
''' | |
- def __init__(self, c_path='/etc/salt/master', mopts=None): | |
+ def __init__(self, c_path='HOMEBREW_PREFIX/etc/salt/master', mopts=None): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask.ext.sqlalchemy import SQLAlchemy | |
from sqlalchemy.sql import select, func | |
from sqlalchemy.ext.hybrid import hybrid_property | |
from datetime import datetime | |
__all__ = ['User', 'Band', 'Genre', 'BandVote', 'BandGenre', 'BandGenreVote'] | |
db = SQLAlchemy() | |
class User(db.Model): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Andreas Christian Mueller <[email protected]> | |
# (c) 2012 | |
# | |
# License: MIT | |
import os | |
import sys | |
import random | |
from PIL import Image | |
from PIL import ImageDraw |
OlderNewer