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
/* open up chrome dev tools (Menu > More tools > Developer tools) | |
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading) | |
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR | |
* open up JS console and enter: var har = [paste] | |
* (pasting could take a while if there's a lot of requests) | |
* paste the following JS code into the console | |
* copy the output, paste into a text file | |
* open up a terminal in same directory as text file, then: wget -i [that file] | |
*/ |
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
# turn a jar with a Main-Class into a stand alone executable | |
(echo '#!/usr/bin/env java -jar'; cat blahblah.jar) > blah | |
# turn a jar with a particular main clas into a stand alone executable | |
(echo '#!/usr/bin/env java -jar package.MainClass'; cat blahblah.jar) > blah |
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
ctrl-z | |
bg | |
touch /tmp/stdout | |
touch /tmp/stderr | |
gdb -p $! | |
# In GDB | |
p dup2(open("/tmp/stdout", 1), 1) | |
p dup2(open("/tmp/stderr", 1), 2) |
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
package preloadagent; | |
/** | |
Copyright 2010 Sam Pullara | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
"""ajaxgoogle.py - Simple bindings to the AJAX Google Search API | |
(Just the JSON-over-HTTP bit of it, nothing to do with AJAX per se) | |
http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje | |
brendan o'connor - gist.github.com/28405 - anyall.org""" | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
import urllib, urllib2 |