Skip to content

Instantly share code, notes, and snippets.

View roddds's full-sized avatar

Rodrigo Deodoro roddds

View GitHub Profile
alias runserver="python manage.py runserver_plus"
alias sp="python manage.py shell_plus"
alias manage="./manage.py"
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"
@roddds
roddds / manga.py
Last active August 29, 2015 14:04
#! /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)
def end_other(a, b):
a.lower()
b.lower()
if len(a) > len(b):
if a[len(b):] == b:
return True
return False
else:
if b[len(a):] == a:
@roddds
roddds / gist:6753610
Created September 29, 2013 15:46
Sublime Text keymap for linux
[
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} }
]
@roddds
roddds / .zshrc
Created September 25, 2013 19:19
useful git/django aliases
alias dif="git diff"
alias add="git add --all"
alias commit="git commit -m"
alias runserver="python manage.py runserver_plus"
alias sp="python manage.py shell_plus"
alias manage="./manage.py"
alias undo="git reset --soft HEAD^1"
alias unstage="git reset HEAD"
function push {
echo "git push origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD)"
git push origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
}
function pull {
echo "git pull origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD)"
git pull origin $(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
}
@roddds
roddds / setup.sh
Last active December 20, 2015 12:39
sudo apt-get install build-essential python-pip ssh vim zsh git git-flow
sudo pip install virtualenvwrapper
export WORKON_HOME=~/Envs
mkdir -p $WORKON_HOME
source /usr/local/bin/virtualenvwrapper.sh
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
num = []
maior = 0
for i in range(3):
num.append(int(raw_input("Numero %d: " % (i+1))))
if num[i] > maior:
maior = num[i]
print "\n Maior numero eh %d \n" % maior
if maior % 2 == 0:
@roddds
roddds / roddds.zsh-theme
Last active September 4, 2020 20:53
my zsh theme
# Fino theme by roddds
# Use with a dark background and 256-color terminal!
# You can set your computer name in the ~/.box-name file if you want.
# Tested in Linux Mint
# Borrowing shamelessly from these oh-my-zsh themes:
# bira
# robbyrussell
@roddds
roddds / Microsoft.PowerShell_profile.ps1
Created March 24, 2013 23:20
PowerShell profile for usage with git for windows and virtualenvwrapper
Set-ExecutionPolicy Unrestricted
import-module virtualenvwrapper
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\PoshGit_b45f39b7c5d40bebb0b5850a200fc120e9bf3646\profile.example.ps1")