Skip to content

Instantly share code, notes, and snippets.

View jakob-stoeck's full-sized avatar
🥋
git happens

Jakob Stoeck jakob-stoeck

🥋
git happens
View GitHub Profile
svn status --no-ignore | grep '^\?' | sed 's/^\? //'
svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs rm -rf
svn merge folder/@HEAD folder/@637 folder/
@jakob-stoeck
jakob-stoeck / gist:747435
Created December 19, 2010 16:11
python poker network startup script
#! /bin/sh
#
# Copyright (C) 2006 - 2010 Loic Dachary <loic@dachary.org>
# Copyright (C) 2004, 2005, 2006 Mekensleep <licensing@mekensleep.com>
# 24 rue vieille du temple, 75004 Paris
#
# This software's license gives you freedom; you can copy, convey,
# propagate, redistribute and/or modify this program under the terms of
# the GNU Affero General Public License (AGPL) as published by the Free
# Software Foundation, either version 3 of the License, or (at your
@jakob-stoeck
jakob-stoeck / gist:2140868
Created March 20, 2012 20:18
use z to open macos folders (go to with regex)
# add to your ~/.profile
. ~/sources/z/z.sh
zz () { (z $* && open .); }
# "$ z some_folder" now goes to that folder in the Terminal
# "$ zz some_folder" opens this folder in the Finder
@jakob-stoeck
jakob-stoeck / gist:3142547
Created July 19, 2012 09:17
redmine set ticket status bookmarklet
javascript:document.getElementById('issue_status_id').selectedIndex=5;document.getElementById('issue-form').submit();
@jakob-stoeck
jakob-stoeck / U.S. - umlauts without dead keys.keylayout
Last active December 11, 2015 07:28
Mac OS X U.S. keyboard layout with German umlauts without dead keys: alt-u -> ü, alt-shift-u -> Ü. # Installation 1. Place into ~/Library/Keyboard Layouts/U.S. - umlauts without dead keys.keylayout 2. Log out and log in again 3. Select keyboard layout in System Preferences
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.4 on 2013-01-18 at 18:00 (MEZ)-->
<!--Last edited by Ukelele version 2.2.4 on 2013-01-18 at 18:01 (MEZ)-->
<keyboard group="0" id="5591" name="U.S. - without dead keys" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>
#!/bin/bash
# Script to use with git bisect for phpunit tests for yii apps
#
# Should lie under protected/tests
# usage:
#
# git bisect start __bad__ __good__ --
# git bisect run protected/tests/git-bisect-phpunit.sh __args__
#
# where __args__ are phpunit arguments:
@jakob-stoeck
jakob-stoeck / Copy as textile
Created October 29, 2013 17:52
Copies SequelPro results as a textile table to use it in Redmine or other textile-supported systems. To use, just copy it into your SequelPro Bundle Editor.
#!/usr/bin/php
<?php
$in = fopen('php://stdin', 'r');
$result=array();
$format='_.';
while($line=fgetcsv($in, 0, "\t")) {
$result[]='|'.$format.implode('|'.$format, $line).'|';
$format='';
}
fclose($in);
@jakob-stoeck
jakob-stoeck / events.html
Last active August 29, 2015 13:56
show fb photos grouped by event. use with localhost:8080 (e.g. `python -m SimpleHTTPServer 8080`)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FB Events</title>
</head>
<body>
<div id="pictures"></div>
<div id="fb-root"></div>
@jakob-stoeck
jakob-stoeck / parse-push-events-export.js
Created November 25, 2016 17:24
Export Parse Push Events
// Export Parse Push Events
// log into http://parse.com and run this code in your web console
// the pushes will be inside window.pushes
(function() {
const parseApp = '[YOUR_PARSE_APP_NAME]'; // the string in the URL https://parse.com/apps/[PARSE_APP]/ e.g. 'push-tests--2'
const entries = 10;
'use strict';
function get(theUrl) {
return new Promise(