Skip to content

Instantly share code, notes, and snippets.

@oyvholm
oyvholm / README
Created May 30, 2010 13:27
Workaround for storing empty directories in Git
This is a workaround for storing empty directories in Git.
People have suggested things like storing empty .gitignore files in every empty
directory, but sometimes this is not something we want to do. Instead, use
git-store-dirs to create a file named ".emptydirs" at the top of the working
tree that contains a null-separated list of all empty directories, and use
git-restore-dirs to get them all back.
@oyvholm
oyvholm / README.md
Created April 25, 2010 22:32
Demo of MIME problem when using git format-patch.

Demo of MIME problem when using git format-patch.

Execute ./runme.sh and enjoy.

Keybase proof

I hereby claim:

  • I am sunny256 on github.
  • I am sunny256 (https://keybase.io/sunny256) on keybase.
  • I have a public key whose fingerprint is A006 05D6 E676 B319 55E2 E77E FB0C BEE8 94A5 06E5

To claim this, I am signing this object:

@oyvholm
oyvholm / pacmd_list-sinks.txt
Created July 27, 2016 20:15
Pulseaudio problem
$ pacmd list-sinks
Welcome to PulseAudio! Use "help" for usage information.
>>> 1 sink(s) available.
* index: 0
name: <auto_null>
driver: <module-null-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
@oyvholm
oyvholm / output.txt
Created September 2, 2013 11:40
Example of box.com with git-annex
2013-09-02 13:33:24 sunny@linode:~/annex/opptak/src/bundle (master)
$ ga copy gpstools.bundle --to box.com
copy gpstools.bundle (gpg)
You need a passphrase to unlock the secret key for
user: "Øyvind A. Holm (Personal key) <sunny@sunbase.org>"
4096-bit ELG-E key, ID 62B5EC77, created 2008-07-21 (main key ID 94A506E5)
gpg: gpg-agent is not available in this session
(checking box.com...) (to box.com...)
ok

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

@oyvholm
oyvholm / eight_queens.sql
Last active November 5, 2015 19:29 — forked from adewes/eight_queens.sql
Eight Queens Problem Solved using Common Table Expressions
WITH RECURSIVE
positions(i) as (
VALUES(0)
UNION SELECT ALL
i+1 FROM positions WHERE i < 63
),
solutions(board, n_queens) AS (
SELECT '----------------------------------------------------------------', cast(0 AS bigint)
FROM positions
UNION
@oyvholm
oyvholm / svngit.textile
Created August 27, 2012 00:46 — forked from gorenje/svngit.textile
Subversion v. Git - Thinking in patches

Introduction

This post attempts to provide Subversion developers a new perspective on Git and how git is differs from
subversion but not using the usual “git is distributed development” or “git is peer-to-peer versioning
management”, which tend not provide an argument for an existing subversion project to switch to git.

Instead, I will attempt to provide a historical background to the development of the first versioning
tools and how these lead to the development of git. It is more that probably that certain historical events
mentioned here are completely and utterly wrong, this not intended. Corrections and improvements are very
welcome!

@oyvholm
oyvholm / jepp.txt
Created July 24, 2012 05:02
New gist from the Android app
Sånn går nu dagan.