Skip to content

Instantly share code, notes, and snippets.

View zaach's full-sized avatar
🎯
Focusing

Zach Carter zaach

🎯
Focusing
View GitHub Profile
import os
import cgi
form = cgi.FieldStorage()
callback = form.getvalue('callback','')
json = '{ip: "'+cgi.escape(os.environ["REMOTE_ADDR"])+'"}'
if callback != '':
print 'Content-Type: application/javascript'
<script>
// callback function
function getip(json){
alert(json.ip) // alerts the ip address
}
</script>
<script type="text/javascript" src="http://jsonip.appspot.com/?callback=getip"> </script>
#!/bin/bash
cd $1
gvim
cd -
// Ubiquity Google calculator script
// by Zach Carter http://zaa.ch
// MPL, MIT licensed 2008
(function(){
function scrapeResult(data) {
if(data.match(/<img src=\/images\/calc_img.gif width=40 height=30 alt="">/)){
return data.match(/<h2 class=r><font size=\+1><b>(.+)<\/b><\/h2>/)[1];
}else {
/**************************
* Pipe Example *
* *
* ls | wc > output *
* *
* Date: 09/20/07 *
* alagor@cse.usf.edu *
***************************/
#include <sys/wait.h>
#include <assert.h>
# Explaining redirection and file descriptors in C
# I only had a vague notion of the process, and it
# had been a year since I had worked with C!
# Still, wasn't TOO bad of an explanation.
# The tutorial to follow along is here: http://gist.github.com/49106
Qi: hey Zact
Zach
me: zact??
Qi: lol
Let's make a list of Sinatra-based apps!
Apps:
- http://github.com/cschneid/irclogger "Sinatra based irclogger.com"
- http://github.com/rtomayko/wink "minimalist blogging engine"
- http://github.com/foca/integrity "The easy and fun Continuous Integration server"
- http://github.com/sr/git-wiki "git-powered wiki"
- http://github.com/entp/seinfeld "Seinfeld-inspired productivity calendar to track your public github commits."
- http://github.com/karmi/marley "Marley, the blog engine without <textareas>."
- http://github.com/ichverstehe/gaze "Serve up your Markdown files with this tiny Sinatra app!"
Leaks in window 0xa790ebc0:
[+] [leaked object] (915e7f20) = [HTMLAnchorElement]
[ ] baseURI = true
[ ] textContent = true
[+] compareDocumentPosition (9063b310) = [Function]
[+] extend (a6d75740, http://static.ak.fbcdn.net/rsrc.php/z7G8N/lpkg/2fp2niyd/en_US/141/161088/js/c2oyv66aau0c088s.pkg.js, 79-81) = [Function]
[-] extend (a6d75740, http://static.ak.fbcdn.net/rsrc.php/z7G8N/lpkg/2fp2niyd/en_US/141/161088/js/c2oyv66aau0c088s.pkg.js, 79-81) = [Function]
[-] mixin (a6d75b00, http://static.ak.fbcdn.net/rsrc.php/z7G8N/lpkg/2fp2niyd/en_US/141/161088/js/c2oyv66aau0c088s.pkg.js, 98-98) = [Function]
[-] bind (a6d75b40, http://static.ak.fbcdn.net/rsrc.php/z7G8N/lpkg/2fp2niyd/en_US/141/161088/js/c2oyv66aau0c088s.pkg.js, 101-102) = [Function]
[-] curry (a6d75c40, http://static.ak.fbcdn.net/rsrc.php/z7G8N/lpkg/2fp2niyd/en_US/141/161088/js/c2oyv66aau0c088s.pkg.js, 15-16) = [Function]
Rocket Noodles
Rice noodles (or ramen noodles)
Chili garlic sauce (use sparingly, it's really hot)
Srirache hot chili sauce
Vegetariai mushroom oyster sauce
Onion
Dash of sugar
Oil
content narwhal-xpc content/
resource narwhal-xpc resources/
content narwhal narwhal/
skin narwhal-xpc classic/1.0 skin/classic/