Skip to content

Instantly share code, notes, and snippets.

View lukaskollmer's full-sized avatar
💭
frolicking

Lukas Kollmer lukaskollmer

💭
frolicking
View GitHub Profile
@neonichu
neonichu / greader.rb
Created January 21, 2012 19:15
Backup your Google Reader data
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
page = agent.get('https://accounts.google.com/ServiceLoginAuth')
form = page.forms.first
form.Email = '<<<Your Google Reader username>>>'
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@tibr
tibr / NSFileManager+DoNotBackup.h
Created March 8, 2012 09:42
Setting the do not backup attribute in different iOS versions
@interface NSFileManager (DoNotBackup)
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
@end
@bradmontgomery
bradmontgomery / dummy-web-server.py
Last active May 19, 2025 20:39
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request:
@neonichu
neonichu / pocketcasts2opml.sh
Created March 31, 2012 17:29
Export OPML from PocketCasts
#!/bin/sh
##
## Generate OPML from your PocketCasts podcast list
##
## You need to retrieve the 'Podcastdb.sqlite' file using iExplorer
## or some similar utility
##
cat <<EOF
@LeZuse
LeZuse / Javascript-base.sublime-snippet
Last active March 20, 2023 16:52
Sublime Text Javascript snippets
<snippet>
<content><![CDATA[base(this, '${1:method}'${2});${0}]]></content>
<tabTrigger>base</tabTrigger>
<scope>source.js</scope>
<description>Base method call</description>
</snippet>
@stevetranby
stevetranby / objc2all.sh
Created April 25, 2012 12:04
Converting Obj-c to CPP code
#!/usr/bin/env sh
# WARNING:
# WARNING: This script may destroy your code, make sure to backup before running.
# WARNING:
################################
# convert .m files to .cpp
################################
#ls -1 *.m | while read f
@paulmillr
paulmillr / active.md
Last active May 15, 2025 11:20
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@benbuckman
benbuckman / intercept-stdout.js
Created May 20, 2012 15:42 — forked from pguillory/gist:729616
Hooking into Node.js stdout, pipe stdout to telnet
var _ = require('underscore'),
util = require('util');
// intercept stdout, passes thru callback
// also pass console.error thru stdout so it goes to callback too
// (stdout.write and stderr.write are both refs to the same stream.write function)
// returns an unhook() function, call when done intercepting
module.exports = function interceptStdout(callback) {
var old_stdout_write = process.stdout.write,
old_console_error = console.error;
@LeszekSwirski
LeszekSwirski / inout.cpp
Last active March 25, 2020 06:48
C++ out/inout parameters
#include <algorithm>
template <typename T>
class out_ {
public:
explicit out_(T& val) : pval(&val) {}
explicit out_() : pval(nullptr) {}
void operator=(const T& newval) {
if (pval) {