Here is a good example: http://stackoverflow.com/questions/5761617/pyramid-authorization-for-stored-items/5761901#5761901
This file contains 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/autoload/gutentags/ctags.vim b/autoload/gutentags/ctags.vim | |
index 5e0b874..088634d 100644 | |
--- a/autoload/gutentags/ctags.vim | |
+++ b/autoload/gutentags/ctags.vim | |
@@ -161,7 +161,8 @@ function! gutentags#ctags#generate(proj_dir, tags_file, write_mode) abort | |
if has('win32') | |
let l:cmd .= ' -l "' . l:actual_tags_file . '.log"' | |
else | |
- let l:cmd .= ' ' . printf(s:unix_redir, '"' . l:actual_tags_file . '.log"') | |
+ " let l:cmd .= ' ' . printf(s:unix_redir, '"' . l:actual_tags_file . '.log"') |
This file contains 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 8c7356085c05975f69f71c0023db791f09b296c1 Mon Sep 17 00:00:00 2001 | |
From: Rob Berry <[email protected]> | |
Date: Fri, 23 Sep 2016 08:55:30 +0100 | |
Subject: [PATCH] Hash and List maps | |
--- | |
src/Data/Workshop/HashMap.hs | 37 +++++++++++++++++++++++++++---------- | |
src/Data/Workshop/ListMap.hs | 20 +++++++++++--------- | |
2 files changed, 38 insertions(+), 19 deletions(-) |
This file contains 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
{-# LANGUAGE ExistentialQuantification #-} | |
module Main where | |
-- data Map key value = Empty | (Eq key, Ord key) => Node key value (Map key value) (Map key value) | |
data Map key value = Empty | Node key value (Map key value) (Map key value) deriving (Show) | |
contains :: (Ord a, Eq a) => Map a t -> a -> Bool | |
contains Empty _ = False | |
contains (Node k' _ l r) k | |
| k' > k = contains l k |
This file contains 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 ubuntu:14.04 | |
RUN \ | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ | |
apt-get update && \ | |
apt-get install -y software-properties-common python-software-properties && \ | |
add-apt-repository -y ppa:webupd8team/java && \ | |
apt-get update && \ | |
apt-get install -y oracle-java8-installer && \ | |
rm -rf /var/lib/apt/lists/* && \ |
This file contains 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
#!/usr/bin/env zsh | |
setopt EXTENDED_GLOB | |
echo Watching **/*.hs~dist* | |
hobbes "*.hs" | while read fname; do | |
echo $fname | |
stack build | |
done |
This file contains 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/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix | |
index 910d763..3111e9a 100644 | |
--- a/pkgs/top-level/python-packages.nix | |
+++ b/pkgs/top-level/python-packages.nix | |
@@ -5744,13 +5744,14 @@ let | |
}; | |
buildInputs = with self; [ pkgs.libev ]; | |
+ CFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-std=gnu99"; | |
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ]; |
This file contains 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 get_count(q): | |
count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
count = q.session.execute(count_q).scalar() | |
return count | |
q = session.query(TestModel).filter(...).order_by(...) | |
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
print q.count() |
This file contains 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
import cStringIO | |
import unicodecsv | |
from github import Github | |
repo = 'USER/REPO' | |
token = 'GITHUBTOKENHERE' | |
def main(): | |
g = Github(token) |
- git flow release start x.x.x
- prelease to set the correct version number. Not always needed if making a major release. Do not accept offer to commit changes.
- Update CHANGES.rst and commit
- git flow release finish x.x.x
- git checkout x.x.x (replace 'x.x.x' with the name of the git-glow release tag'
- If uploading to pypi, release (using twine might be better) else python setup.py sdist
- git checkout develop
- postrelease to update setup.py and CHANGES.rst with new dev version
NewerOlder