Skip to content

Instantly share code, notes, and snippets.

Rodrigo Deodoro roddds

Block or report user

Report or block roddds

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
roddds /
Last active Apr 28, 2019
Recursively delete all empty directories
import os
for dirpath, dirnames, files in os.walk('.'):
if not (files or dirnames):
import subprocess
import asyncio
import os
import re
from collections import namedtuple
from bs4 import BeautifulSoup
import requests
import time
import sys
import sched
from pync import Notifier
def main():
seconds = int(sys.argv[1]) * 60
text = sys.argv[2]
View Timer decorator.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
roddds / gist:a1f42bae598028ac7809
Last active Nov 24, 2017 — forked from raddevon/gist:67935d320ee9b726d19d
Adobe tries to strong-arm me into keeping Creative Cloud
View gist:a1f42bae598028ac7809

To everyone who got here through Twitter or Facebook or Hacker News or whatever: THIS IS NOT ME.

The "Me" in this transcript is @raddevon, who shared his story first on reddit.

List of incompetent jackasses who can't check a source if their lives depended on it:

View gist:5cb26bd4c9fe7466b6eb
branch = True
omit = *migrations*,
roddds /
Created Jul 27, 2015
Showing foreign key attributes on Django Admin
from django.contrib import admin
from django.core.urlresolvers import reverse
from .models import Carro, Fabrica, Pais
class CarroAdmin(admin.ModelAdmin):
list_display = ('nome', 'fabrica', 'pais')
def queryset(self):
qs = super(CarroAdmin, self).queryset()
alias runserver="python runserver_plus"
alias sp="python shell_plus"
alias manage="./"
alias syncdb="manage syncdb --migrate"
alias dif="git diff"
alias add="git add --all"
alias gs="git status"
alias commit="git commit -m"
alias gl="git log --graph --decorate --all"
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import urllib
from BeautifulSoup import BeautifulSoup as bs
def get_soup(link):
html = urllib.urlopen(link).read()
return bs(html)
View gist:7516735
def end_other(a, b):
if len(a) > len(b):
if a[len(b):] == b:
return True
return False
if b[len(a):] == a:
You can’t perform that action at this time.