Skip to content

Instantly share code, notes, and snippets.

View stefankoegl's full-sized avatar

Stefan Kögl stefankoegl

View GitHub Profile
@stefankoegl
stefankoegl / pr.md
Created October 28, 2015 19:20 — forked from kennethreitz/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@stefankoegl
stefankoegl / keybase.md
Created August 31, 2014 09:10
keybase.md

Keybase proof

I hereby claim:

  • I am stefankoegl on github.
  • I am skoegl (https://keybase.io/skoegl) on keybase.
  • I have a public key whose fingerprint is 49F5 B4DC 86E4 9BA3 189D E890 EB7F 29BC 9300 27D0

To claim this, I am signing this object:

@stefankoegl
stefankoegl / couch.log
Created April 26, 2014 21:55
Couch 1.6.x upgrade
[Sat, 26 Apr 2014 21:56:42 GMT] [info] [<0.1117.0>] Stopping all ongoing replications because the replicator database was deleted or changed
[Sat, 26 Apr 2014 21:56:42 GMT] [error] [<0.1117.0>] ** Generic server couch_replicator_manager terminating
** Last message in was {'EXIT',<0.1119.0>,
{{badmatch,
{changes_args,"continuous",fwd,0,
1000000000000000,main_only,undefined,
infinity,[],undefined,[],true,[],false,
[]}},
[{couch_changes,handle_changes,3,
[{file,"couch_changes.erl"},{line,45}]},
@stefankoegl
stefankoegl / log.txt
Created October 6, 2013 19:29
django-social-auth -- Python 3
stefan@stefan-folio:~$ virtualenv -p /usr/bin/python3.3 --distribute venv
Running virtualenv with interpreter /usr/bin/python3.3
Using base prefix '/usr'
New python executable in venv/bin/python3.3
Also creating executable in venv/bin/python
Installing distribute.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done.
Installing pip................done.
stefan@stefan-folio:~$ cd venv/
stefan@stefan-folio:~/venv$ source bin/act
activate activate.csh activate.fish activate_this.py
@stefankoegl
stefankoegl / couch.log
Created August 13, 2013 11:23
couchdb error log
[Fri, 02 Aug 2013 23:42:19 GMT] [info] [<0.27504.1016>] 71.19.150.216 - - GET /mygpo_categories/ 200
[Fri, 02 Aug 2013 23:42:20 GMT] [error] [<0.24606.165>] ** Generic server <0.24606.165> terminating
** Last message in was {tcp,#Port<0.526814>,
<<"HTTP/1.1 500 Internal Server Error\r\nServer: CouchDB/1.3.1 (Erlang OTP/R15B03)\r\nDate: Fri, 02 Aug 2013 23:42:54 GMT\r\nContent-Type: application/json\r\nContent-Length: 370\r\nCache-Control: must-revalidate\r\n\r\n">>}
** When Server state == {state,"example.com",5984,infinity,
#Ref<0.0.4152.248048>,false,undefined,[],false,
#Port<0.526814>,false,[],
{[{request,
{url,
"http://user:********@example.com:5984/mygpo_userdata/_changes?feed=continuous&style=all_docs&since=1846059&heartbeat=10000",
[Thu, 13 Jun 2013 10:38:20 GMT] [info] [<0.4686.175>] 176.28.52.105 - - POST /mygpo/_ensure_full_commit 201
[Thu, 13 Jun 2013 10:38:21 GMT] [info] [<0.408.0>] recording a checkpoint for `http://stefan:*****@176.28.52.105:5984/mygpo/` -> `http://stefan:*****@127.0.0.1:5984/mygpo/` at source update_seq 65737128
[Thu, 13 Jun 2013 10:38:21 GMT] [info] [<0.350.0>] Starting index update for db: mygpo idx: _design/episode_states-tmp
[Thu, 13 Jun 2013 10:38:21 GMT] [info] [<0.247.0>] Closing index for db: mygpo idx: _design/podcasts-tmp sig: "03d98488c40b7dcedd53fcd4ffac13a8"
reason: {timeout,
{gen_server,call,
[<0.251.0>,
{update,
{mrst,
<<3,217,132,136,196,11,125,206,221,83,252,212,255,172,
No. Time Source Destination Protocol Info
12 4.333131 192.168.0.230 178.249.136.150 HTTP GET /users/29254752-manschool/tracks HTTP/1.1
Frame 12: 422 bytes on wire (3376 bits), 422 bytes captured (3376 bits)
Ethernet II, Src: D-LinkIn_4b:27:2d (14:d6:4d:4b:27:2d), Dst: AdbBroad_b5:f3:d1 (64:87:d7:b5:f3:d1)
Internet Protocol Version 4, Src: 192.168.0.230 (192.168.0.230), Dst: 178.249.136.150 (178.249.136.150)
Transmission Control Protocol, Src Port: 57752 (57752), Dst Port: http (80), Seq: 1, Ack: 1, Len: 356
Hypertext Transfer Protocol
GET /users/29254752-manschool/tracks HTTP/1.1\r\n
A-Im: feed\r\n
@stefankoegl
stefankoegl / gist:5520119
Last active December 17, 2015 00:19
Weirdness when deleting CouchDB replication document
$ curl http://127.0.0.1:5984/
{"couchdb":"Welcome","uuid":"39ca13ed778fa8a6376ed7affee79b06","version":"1.3.0","vendor":{"version":"1.3.0","name":"The Apache Software Foundation"}}
$ curl http://127.0.0.1:5984/_replicator/mygpo_categories
{"_id":"mygpo_categories","_rev":"5-35ceab198cf3edc63865dcb081551ae8","source":"mygpo","target":"http://127.0.0.1:5984/mygpo_categories","create_target":true,"user_ctx":{"name":"stefan","roles":["admin"]},"filter":"generic/is_type","query_params":{"doc_type":"Category"},"owner":"stefan","_replication_state":"completed","_replication_state_time":"2013-04-29T08:09:53+00:00","_replication_id":"cd589cae67f2f59ec6bf274fa35ec32b","_replication_stats":{"revisions_checked":1994,"missing_revisions_found":1994,"docs_read":1994,"docs_written":1994,"doc_write_failures":0,"checkpointed_source_seq":232955728}}
# using the _rev from the GET above
$ curl -X DELETE "http://stefan:***********@127.0.0.1:5984/_replicator/mygpo_categories?rev=5-35ceab198cf3edc63865dcb081551ae8"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:igor="http://emonk.net/IGOR" xmlns:sc="http://podlove.org/simple-chapters" version="2.0">
<channel>
<title>Fanboys</title>
<link>http://fanboys.fm</link>
<atom:link href="http://fanboys.fm/episodes.mp3.rss" rel="self" type="application/rss+xml" title="MP3 Audio"/>
<atom:link rel="alternate" href="http://fanboys.fm/episodes.m4a.rss" type="application/rss+xml" title="M4A Audio"/>
<language>de-de</language>
<copyright>cc-by-nc-sa</copyright>
<itunes:subtitle>Wayne's World for radio</itunes:subtitle>
@stefankoegl
stefankoegl / python-toolbox.md
Last active December 15, 2015 10:29
My Python toolbox