Skip to content

Instantly share code, notes, and snippets.

View tkreis's full-sized avatar
🏁

Thomas tkreis

🏁
View GitHub Profile
@tkreis
tkreis / gist:5815752
Created June 19, 2013 16:36
fixing Zendesk POST parameter in php

When trying to get requests from the zendesk via their proxy it sends them in the following fashion:

body:{"user_id":"50","api_key":"XXX"}

PHP will have problems parsing the request header and stuffing it into the global $_POST variable. To get it to work you can use the following snippet. This returns an array, just like you would normally expect:

get_object_vars((json_decode(file_get_contents("php://input"))));
@tkreis
tkreis / gist:5572396
Created May 13, 2013 23:26
rollback with capistrano
cap production deploy -S revision=58252554fab01c393dcbed846c607f36ca738ddb
@tkreis
tkreis / gist:4534822
Created January 15, 2013 00:17
merge file from different branch with current file
git checkout --merge "branch" "file"
git mergetool