Skip to content

Instantly share code, notes, and snippets.

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"')
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(-)
@rob-b
rob-b / map.hs
Created September 15, 2016 22:08
{-# 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
@rob-b
rob-b / Dockerfile
Created October 7, 2015 15:22
Java 8 docker file for working with mechanical turk
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/* && \
@rob-b
rob-b / hobbeswrapper.zsh
Last active August 29, 2015 14:27
Watch all `.hs` files and run `stack build` when any of them are modified
#!/usr/bin/env zsh
setopt EXTENDED_GLOB
echo Watching **/*.hs~dist*
hobbes "*.hs" | while read fname; do
echo $fname
stack build
done
@rob-b
rob-b / python-packages.nix.diff
Created June 28, 2015 09:09
Changes needed to install gevent with nix
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 ];
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()
@rob-b
rob-b / doc.rst
Last active August 29, 2015 14:14 — forked from hadrien/doc.rst
@rob-b
rob-b / listissues.py
Created September 29, 2014 09:19
Requires `PyGithub` and `unicodecsv`
import cStringIO
import unicodecsv
from github import Github
repo = 'USER/REPO'
token = 'GITHUBTOKENHERE'
def main():
g = Github(token)
@rob-b
rob-b / process.rst
Created October 26, 2013 11:40
zest.releaser with git-flow
  1. git flow release start x.x.x
  2. prelease to set the correct version number. Not always needed if making a major release. Do not accept offer to commit changes.
  3. Update CHANGES.rst and commit
  4. git flow release finish x.x.x
  5. git checkout x.x.x (replace 'x.x.x' with the name of the git-glow release tag'
  6. If uploading to pypi, release (using twine might be better) else python setup.py sdist
  7. git checkout develop
  8. postrelease to update setup.py and CHANGES.rst with new dev version