Skip to content

Instantly share code, notes, and snippets.

@oyvholm
oyvholm / README.md
Created February 25, 2014 03:51 — forked from BrianHicks/README.md

Graph taskwarrior tasks with graphviz

Dependencies

Running

graphdeps produces "deps.png" in the working directory. Just graphdeps will graph all tasks. You can change the default behavior by specifying a more specific query.

@oyvholm
oyvholm / gist:9764066
Created March 25, 2014 15:21
"npm install sails" woes
$ sudo npm install -g sails
[sudo] password for sunny: hunter2
npm http GET https://registry.npmjs.org/sails
npm http 304 https://registry.npmjs.org/sails
npm http GET https://registry.npmjs.org/express/3.4.0
npm http GET https://registry.npmjs.org/connect-mongo/0.3.2
npm http GET https://registry.npmjs.org/socket.io/0.9.14
npm http GET https://registry.npmjs.org/async/0.2.9
npm http GET https://registry.npmjs.org/connect-redis/1.4.5
npm http GET https://registry.npmjs.org/winston/0.7.1
@oyvholm
oyvholm / README.md
Last active August 29, 2015 14:03
Create visual Git graph of all branches containing a specific commit

Create visual Git graph of all branches containing a specific commit

Gist location: http://git.io/Z65-Hg

This is a reply to this message posted to the Git mailing list:

From: Robert Dailey

@oyvholm
oyvholm / t5150-output.txt
Created July 3, 2014 21:34
t5150-request-pull.sh fails under Debian 7.5 when compiling git v2.0.1-472-g6f92e5f
*** t5150-request-pull.sh ***
not ok 1 - setup
#
#
# git init --bare upstream.git &&
# git init --bare downstream.git &&
# git clone upstream.git upstream-private &&
# git clone downstream.git local &&
#
# trash_url="file://$TRASH_DIRECTORY" &&
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
# create our directories
# See docs in http://git-annex.branchable.com/internals/hashing/ and implementation in http://sources.debian.net/src/git-annex/5.20140227/Locations.hs/?hl=408#L408
import hashlib
import struct
def hashdirlower(key):
hasher = hashlib.md5()
hasher.update(key)
digest = hasher.hexdigest()
return "%s/%s/" % (digest[:3], digest[3:6])
@oyvholm
oyvholm / runme
Last active August 29, 2015 14:20
Strange git-annex behaviour
#!/bin/bash
#=======================================================================
# runme
# File ID: 36b615f8-f051-11e4-a442-fefdb24f8e10
#
# Demonstration of strange behaviour in git-annex, README is deleted
# after a "git annex get" when --file is used together with "git annex
# addurl". It's also unable to check the existence of the file on the
# FTP server, so I have to use --force to drop it. This does not happen
@oyvholm
oyvholm / mandelbrot.sql
Last active August 29, 2015 14:26 — forked from rupey/mandelbrot.sql
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,
@oyvholm
oyvholm / runme
Last active August 29, 2015 14:28
hPutChar error message in git-annex with UTF-8 chars above 7F in filenames
#!/bin/bash
#=======================================================================
# runme
# File ID: 38d0ddc8-49bb-11e5-a06b-fefdb24f8e10
#
# Author: Øyvind A. Holm <sunny@sunbase.org>
# License: GNU General Public License version 2 or later.
#=======================================================================
*Perl 6 has missed the boat.*
What boat? There is no boat.
*I used to like Perl, but now I use Ruby and Python.*
Glad to hear it.
*The only thing Perl has going for it is the "CPAN":http://search.cpan.org.*