% curl -d '{"text": "#asdf", "mode": "gfm"}' https://api.github.com/markdown
<p>#asdf</p>
% curl -d '{"text": "# asdf", "mode": "gfm"}' https://api.github.com/markdown
<h1>asdf</h1>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh $(ec2ip i-a1b2c3d) | |
function ec2ip() { if [ "$#" -gt 0 ]; then ip=$(ec2din --show-empty-fields -H $1 | grep "^INST" | cut -f17); echo $ip; fi } | |
function ec2pip() { if [ "$#" -gt 0 ]; then ip=$(ec2din --show-empty-fields -H $1 | grep "^INST" | cut -f18); echo $ip; fi } | |
function ec2host() { if [ "$#" -gt 0 ]; then ip=$(ec2din --show-empty-fields -H $1 | grep "^INST" | cut -f4); echo $ip; fi } | |
# ec2ssh i-a1b2c3d | |
function ec2ssh() { if [ "$#" -gt 0 ]; then ip=$(ec2din --show-empty-fields -H $1 | grep "^INST" | cut -f4); echo $ip; ssh $ip; fi } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mh@mbp:~% sudo dtruss -f sudo -u\#$UID whoami 2>/dev/null | |
mh | |
mh@mbp:~% sudo dtruss -f -t fakesyscall sudo -u\#$UID touch / | |
PID/THRD SYSCALL(args) = return | |
28082/0xad253: fork() = 0 0 | |
touch: setting times of ‘/’: Permission denied | |
mh@mbp:~% # note that i only used these methods to hide output | |
mh@mbp:~% # to keep the demo short. dtruss is functional. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for c in $(curl -su michaelhood:$ppp https://api.github.com/repos/github/developer.github.com/pulls/183/commits | fgrep "git/commits" | sed "s/\/git\//\//g" | awk '{print $NF;}' | tr -d \",); do echo "\n### START: $c ###\n\n"; curl -u michaelhood:$ppp -H "Accept: application/vnd.github.beta.diff" $c; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT: https://raw.github.com/github/hubot/1455b62e5b6daffeacb7472db83ccf6502396bea/LICENSE.md | |
refs: | |
http://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/HTML-canvas-guide/SettingUptheCanvas/SettingUptheCanvas.html | |
http://www.html5rocks.com/en/tutorials/canvas/hidpi/ | |
https://code.google.com/p/chromium/issues/detail?id=127852 (WONTFIX) | |
*/ | |
(function(doc) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "# sup markdown" > sup.md | |
cat sup.md | { _t=$(mktemp --suffix=\.html); curl -s -H "Content-type: text/plain" -d @/dev/stdin https://api.github.com/markdown/raw > $_t ; open $_t ; rm -f $_t; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(doc) { | |
$("#repo_details div.url-box ul.native-clones li a span.mini-icon-apple"). | |
parent(). | |
attr('href', function(i,v) { return v.replace(/https:\/\//, "git://"); }); | |
}(document)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT repository_url, repository_description, COUNT(*) AS c | |
FROM [githubarchive:github.timeline] | |
WHERE REGEXP_MATCH(repository_name, r'github([^\.]|$)') | |
GROUP BY repository_url, repository_description | |
ORDER BY c DESC | |
LIMIT 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
trap outdirty SIGINT SIGTERM | |
function out() { | |
echo "out, cleaning up" | |
} | |
function outgood() { | |
echo "success" |
OlderNewer