This file contains hidden or 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
wget -rkpx <address> -l 10 --tries=10 |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# <JsshDriver - drive firefox with js> | |
# Copyright (C) <2010> Gabriel Falcão <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation | |
# files (the "Software"), to deal in the Software without | |
# restriction, including without limitation the rights to use, | |
# copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# <image downloader - bulk-download all images> | |
# Copyright (C) <2010> Gabriel Falcão <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or 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 python | |
# -*- coding: utf-8 -*- | |
# Copyright (C) <2010> Gabriel Falcão <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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
export TERM="xterm-color" | |
alias ls="ls -G" | |
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] " | |
alias egrep="egrep --colour" | |
alias grep="egrep --colour" | |
export PYTHONPATH=$PYTHONPATH:$HOME/usr/python-libs:/Library/Python/2.6/site-packages/ | |
export PATH=$PATH:$HOME/usr/bin:/usr/local/sbin:$HOME/.node_libraries/.npm | |
export GEM_HOME='/usr/local/Cellar/gems/1.8' | |
export BASH_COMPLETION_PATH=$HOME/usr/bash_completion.d | |
if [ -f `brew --prefix`/etc/bash_completion ]; then |
This file contains hidden or 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
+ (NSString*) getClassName { | |
ObjC_Class_Info myClass = [self class]; | |
NSString* className = [NSString stringWithCString: (const char*) myClass->name]; | |
return className; | |
} |
This file contains hidden or 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
import logging | |
import os | |
# Add appengine stuff to path | |
import dev_appserver as script | |
script.fix_sys_path() | |
from google.appengine.api import yaml_errors | |
from google.appengine.tools import dev_appserver | |
from google.appengine.tools import dev_appserver_main as main |
This file contains hidden or 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 python | |
from twisted.internet import reactor | |
from twisted.web import proxy, server | |
from twisted.web.resource import Resource | |
class ProxyResource(Resource): | |
def getChild(self, path, request): | |
request.received_headers['x-forwarded-host'] = request.received_headers['host'] |
This file contains hidden or 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
def paginator_from_hell(items, chunk=5): | |
""" | |
usage: | |
paginator_from_hell(["A","A","A","A","A","B","B","B","B","B",0,0,0,0,0,"D","D","D","D","D","E","E"] | |
returns: | |
[ | |
["A","A","A","A","A"], | |
["B","B","B","B","B"], | |
[0,0,0,0,0], |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# Copyright (C) <2010> Gabriel Falcão <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |