This file contains 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
salt = 65 | |
def incr(): | |
compiled[pointer] += 1 | |
def decr(): | |
compiled[pointer] -= 1 | |
def fw(): | |
global pointer |
This file contains 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 | |
numbers = {'1': 'um', '2': 'dois', '3': 'três', '4': 'quatro', '5': 'cinco', | |
'6': 'seis', '7': 'sete', '8': 'oito', '9': 'nove', '0': 'zero'} | |
units = ['milhão','milhar', 'centenas', 'dezenas', 'unidades'][::-1] | |
chars_incidence = {} | |
def puzzle(n): | |
fat = 1 |
This file contains 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 | |
import imaplib | |
import sys | |
''' | |
Simple script that delete emails from a given sender | |
params: | |
-username: Gmail username | |
-pw: gmail pw | |
-label: If you have a label that holds the emails, specify here |
This file contains 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
function cmatrix_auto(){ | |
while : | |
do | |
read -n 1 -t 100 ch | |
if [ ! -z "$ch" ] | |
then | |
fg | |
fi |
This file contains 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 PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin | |
alias gts='git status' | |
alias gcm='git commit -m' | |
alias gpl='git pull' | |
alias gps='git pull' | |
alias gpr='git pull --rebase' | |
alias gadd='git add' | |
alias gcp='git cherry-pick' | |
alias runserver='./gradlew jettyRun' | |
alias runtests='./gradlew clean build' |
This file contains 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
angular.forEach($scope.msg_filtradas, function(m){ | |
var url = buscar_todos_pontos_url + m.pk + "/"; | |
$http.get(url).success(function(data){ | |
m.data = data; | |
}) | |
}) |
This file contains 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 json | |
with open("erbopencellid.json") as fixtures: | |
conteudo = json.loads("".join(fixtures.readlines())) | |
tamanho = len(conteudo) | |
inicio = 0 | |
range_ = fim = tamanho / 10 | |
for i in range(1, 11): | |
fname = "erbopencellid%d.json" % i | |
print fname, inicio, fim |
This file contains 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
[ | |
{ "keys": ["alt+a"], "command": "toggle_side_bar" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["alt+left"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["alt+right"], "command": "focus_group", "args": { "group": 1 } }, | |
] |
This file contains 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 bash | |
if [ "$1" == "green" ] ; then | |
curl -X POST --data-urlencode "payload={\"text\": \"Build is GREEN! Uhuull.\"}" <your-url> | |
elif [ "$1"== "red" ] ; then | |
curl -X POST --data-urlencode "payload={\"text\": \"Build is RED!!!\"}" <your-url> | |
fi |
This file contains 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 collide(thing1, thing2): | |
# if thing1.is_asteroid() and thing2.is_spaceship(): | |
# thing2.destroy() | |
# elif thing1.is_spaceship() and thing2.is_asteroid(): | |
# thing1.destroy() | |
# elif thing1.is_spaceship() and thing2.is_spaceship(): | |
# random.choice([thing1, thing2]).desmaterialize() | |
# elif thing1.is_asteroid() and thing2.is_asteroid(): | |
# universe.boom() | |
# structured approach |
OlderNewer