Skip to content

Instantly share code, notes, and snippets.


Santiago Espinosa Saigesp

View GitHub Profile
wenbert / Python save image from URL
Created Dec 29, 2010
Python save image from URL
View Python save image from URL
import cStringIO # *much* faster than StringIO
import urllib
import Image
file = urllib.urlopen('')
im = cStringIO.StringIO( # constructs a StringIO holding the image
img ='/home/wenbert/uploaderx_files/test.gif')
except IOError, e:
sebdah /
Last active Jul 5, 2021
Running a background thread in Python
import threading
import time
class ThreadingExample(object):
""" Threading example class
The run() method will be started and it will run in the background
until the application exits.
stephenhardy / git-clearHistory
Created Apr 26, 2013
Steps to clear out the history of a git/github repository
View git-clearHistory
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin<YOUR ACCOUNT>/<YOUR REPOS>.git