Skip to content

Instantly share code, notes, and snippets.

View Saigesp's full-sized avatar
🙄

Santiago Espinosa Saigesp

🙄
View GitHub Profile
@devhammed
devhammed / countries.json
Last active November 12, 2024 20:44
Countries with Name, Dial Code, Emoji Flag and ISO Code
[
{
"name": "Afghanistan",
"flag": "🇦🇫",
"code": "AF",
"dial_code": "+93"
},
{
"name": "Åland Islands",
"flag": "🇦🇽",
@Beneboe
Beneboe / how-to-setup-verified-commits.md
Last active August 18, 2024 13:49
How to Setup Verified Commits on Github
@sebdah
sebdah / threading_example.py
Last active July 18, 2024 14:35
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
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- 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 [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
@wenbert
wenbert / Python save image from URL
Created December 29, 2010 06:24
Python save image from URL
import cStringIO # *much* faster than StringIO
import urllib
import Image
try:
file = urllib.urlopen('http://freegee.sourceforge.net/FG_EN/src/teasers_en/t_gee-power_en.gif')
im = cStringIO.StringIO(file.read()) # constructs a StringIO holding the image
img = Image.open(im)
img.save('/home/wenbert/uploaderx_files/test.gif')
except IOError, e: