This file contains hidden or 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 random | |
TEAMS = 3 | |
PLAYERS_BY_TEAM = 6 | |
groups = { | |
'star': ['Bako', 'JP', 'Vitot', 'Bruno'], | |
'ataque': ['Genê', 'André', 'Lucas Carvalho', 'Ladeia'], | |
'zaga': ['Rabello', 'Tupy', 'Marcinho', 'Pezão', 'Gustavo'], |
This file contains hidden or 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
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="{{url_for('static', filename='css/bolao.css')}}" rel="stylesheet" /> | |
{% block css %}{% endblock %} | |
{% block js %}{% endblock %} | |
</head> |
This file contains hidden or 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
# Description: | |
# Executes a taskDeploy command for spinning up task instances | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# HUBOT_DEPLOY_SCRIPT_LOCATION | |
# HUBOT_DEPLOY_USER | |
# HUBOT_DEPLOY_KEY |
This file contains hidden or 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
# Allows hubot to run commands using chef. | |
# | |
# list nodes - Lists all nodes on Opscode | |
# uptime <server> - Prints uptime | |
# configure <server> - Runs chef client on node | |
module.exports = (robot) -> | |
robot.respond /list nodes$/i, (msg) -> | |
spawn = require('child_process').spawn |
This file contains hidden or 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
global | |
log 127.0.0.1 local0 notice | |
maxconn 50000 | |
daemon | |
stats socket /tmp/proxystats level admin | |
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull |
This file contains hidden or 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
# imgs don't need to be gzipped | |
s3cmd put -c config/.s3cfg-prod-static --acl-public --guess-mime-type --add-header "Cache-Control:public, max-age=31536000" -r static/img s3://my-bucket-name/ | |
# js/css does need gzipping | |
rm -rf static/built-gz; | |
cp -a static/built/ static/built-gz/; | |
find static/built-gz -type f | while read -r x; do gzip -9 -c "$x" > "$x.gz"; mv "$x.gz" "$x"; done; | |
s3cmd put -c config/.s3cfg-prod-static --acl-public --guess-mime-type --add-header "Cache-Control:public, max-age=31536000" --add-header "Content-Encoding: gzip" -r static/built-gz/ s3://my-bucket-name/built/ |
This file contains hidden or 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() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
This file contains hidden or 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 flask | |
app = flask.Flask(__name__) | |
app.config['SERVER_NAME'] = 'localhost' | |
@app.route('/') | |
def index(): return "Index!" | |
if __name__ == '__main__': | |
app.run() |
NewerOlder