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
curl -u <username>:<password> http://api.fanfou.com/statuses/friends_timeline.xml | grep '<text>' | sed 's/<text><\!\[CDATA\[//' | sed 's/\]\]><\/text>//' | sed 's/ //g' |
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 node | |
/** | |
* fanfou.js | |
* A node.js Fanfou client | |
* © 2010 softboysxp.com | |
*/ | |
/** | |
* Copyright 2010 softboysxp.com. All rights reserved. |
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 i in {1..48}; do wget `curl http://sportsillustrated.cnn.com/2011_swimsuit/models/brooklyn-decker/11_brooklyn-decker_$i.html | grep '<div id="cnnImage">' | sed 's/.*"\(.*\.jpg\)".*/\1/'`; 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
# cpuid.s | |
# An x86_64 OS X port of the cpuid example found in Ch. 4 of Professional Assembly Language | |
# | |
# $ as -o cpuid.o cpuid.s | |
# $ ld -o cpuid cpuid.o | |
# $ ./cpuid | |
# GenuineIntel | |
# $ | |
.data |
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
# cpuid2.s | |
# calling libc functions on OS X x64 | |
# | |
# $ as -g -o cpuid2.o cpuid2.s | |
# $ ld -o cpuid2 -lc cpuid2.o | |
# $ ./cpuid2 | |
# Vendor ID: GenuineIntel | |
# $ | |
.data |
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
; A minimal Mach-o x64 executable for OS X (also see below Mountain Lion version) | |
; | |
; $ nasm -f bin -o tiny_hello tiny_hello.s | |
; $ chmod +x tiny_hello | |
; $ ./tiny_hello | |
; Hello World! | |
; $ | |
; c.f. | |
; http://osxbook.com/blog/2009/03/15/crafting-a-tiny-mach-o-executable/ ( the original tiny mach-o executable ) |
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
.text | |
.globl start | |
start: | |
mov r2, #14 | |
adr r1, hello_str | |
mov r0, #1 | |
mov r12, #4 | |
swi 0x80 |
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
curl http://swimsuit.si.com/swimsuit/assets/json/data.min.json | perl -wnE 'say for /assets\\\/media\\\/gallery\\\/(?:\w+\\\/|)[\w\-]+\\\/op\d+-\d+-raw1200\.jpg/g' | sed 's/\\\//\//g' | sort | uniq | xargs -I {} wget "http://swimsuit.si.com/swimsuit/{}" |
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
curl -Ss http://www.si.com/swimsuit/collection/2016 | egrep -o '/swimsuit/model/.+?/2016/photos' | parallel curl -Ss http://www.si.com{} | egrep '<img src=("[^"]+").+?class="image (?:Landscape|Portrait)"\s+/>' | egrep -o 'http://.+?\.jpg' | parallel wget {} |
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
$ diff ddclient-ubnt.bak ddclient-ubnt | |
4252,4253c4252 | |
< my $headers = "X-Auth-Email: $config{$key}{'login'}\n"; | |
< $headers .= "X-Auth-Key: $config{$key}{'password'}\n"; | |
--- | |
> my $headers = "Authorization: Bearer $config{$key}{'password'}\n"; |