Skip to content

Instantly share code, notes, and snippets.

Carta Qtde
Taiga 1
Dispel 2
Annul 2
Krosan Verge 1
Krosan Grip 2
Ogre Battledriver 1
Moldgraf Monstrosity 1
Emeria Shepherd 1
Desolation Twin 1
import re
import json
import requests
from bs4 import BeautifulSoup
with open('wantlist.txt') as f:
for i in f.readlines():
i = i.strip()
# try:
for i in range(len(alist)):
print alist[i]
@vierno
vierno / gunicorn.conf.py
Created September 26, 2013 16:40
Config file for gunicorn.
bind = "127.0.0.1:8666"
workers = 5
pidfile = "/home/deploy/run/portaliesb.pid"
accesslog = "/home/deploy/logs/portaliesb/stdout.log"
errorlog = "/home/deploy/logs/portaliesb/stderr.log"
secure_scheme_headers = {'X-FORWARDED-PROTOCOL': 'http',
'X-FORWARDED-PROTO': 'http',
'X-FORWARDED-SSL': 'off'}
@vierno
vierno / supervisor.conf
Created September 26, 2013 16:39
Config file for supervisor
[program:portaliesb]
directory = /home/deploy/iesb/project
command = /home/deploy/.venvs/iesb/bin/gunicorn_django -c /home/deploy/iesb/deploy/gunicorn.conf.py
user = deploy
group = deploy
stdout_logfile = /home/deploy/logs/iesb/stdout.log
stderr_logfile = /home/deploy/logs/iesb/stderr.log
autostart=true
autorestart=true
@vierno
vierno / ngnix.conf
Created September 26, 2013 16:38
Nginx config File
server {
listen 80;
client_max_body_size 20M;
access_log /var/log/nginx/example.log;
location / {
proxy_pass http://127.0.0.1:8666;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
@vierno
vierno / dojo.py
Created May 10, 2013 22:38 — forked from jeanmask/dojo.py
Passei no último teste e adicionei mais um, esse é o cabuloso...
PRICE = 28
DISCOUNT = [1, 0.95, 0.9, 0.8, 0.75]
def calc_partial(books):
quantity = len(books)
return DISCOUNT[quantity - 1] * quantity * PRICE
def make_groups(books):
@vierno
vierno / gist:3755648
Created September 20, 2012 12:42
Erro - link notícias
<p><a href="#h2href:{"titulo":"App::teste resize","link":"","pagina":"","id_site":"48","modulo":{"schema":"foto_13395239707","id_pk":"44","icon":"","id_site":"48","id_treeapp":"15","titulo":"teste resize","id_site_origem":"48","id_tree_origem":"15"},"rss":{"schema":"","id_site":"48"},"opcoes":{"abrir":"_self","largura":"","altura":"","center":"","scroll":"","origem":""},"dinamico":""}">teste</a></p><p>&nbsp;</p>
<a href="http://publica.divirta-se.cmspublica.com.br/app/noticia/#h2href:{"titulo":"App::Galeria 1","link":"","pagina":"","id_site":"48","modulo":{"schema":"foto_13395239707","id_pk":"37","icon":"","id_site":"48","id_treeapp":"15","titulo":"Galeria 1","id_site_origem":"48","id_tree_origem":"15"},"rss":{"schema":"","id_site":"48"},"opcoes":{"abrir":"_self","largura":"","altura":"","center":"","scroll":"","origem":""},"dinamico":""}"><p>sadsdas </p></a>
@vierno
vierno / publica.pylint
Last active October 7, 2015 22:49
Arquivo de configuração do pylint para o Publica
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.