$: curl -o ~/install-min.sh https://gist.github.com/alejandrobernardis/5624109/raw/661719eb237a390050a80b7ff61fa6955c7839d2/install-min.sh && chmod +x ~/install-min.sh && ~/install-min.sh
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
| SETS=0 | |
| MAX_SETS=4 | |
| IP_ADDRESS="192.168.0.0" | |
| while [ ${SETS} -lt ${MAX_SETS} ]; do | |
| ${iptables} -A INPUT -s ${IP_ADDRESS} -p tcp --destination-port 2700${SETS} -m state --state NEW,ESTABLISHED -j ACCEPT | |
| ${iptables} -A OUTPUT -d ${IP_ADDRESS} -p tcp --source-port 2700${SETS} -m state --state ESTABLISHED -j ACCEPT | |
| let SETS+=1; | |
| done |
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
| re_uid = re.compile(r'(?i)(?<![a-z0-9])[0-f]{32}(?![a-z0-9])') | |
| re_sid = re.compile(r'(?i)(?<![a-z0-9])[0-f]{8}(?:-[0-f]{4}){3}-[0-f]{12}(?![a-z0-9])') |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) 2013 Asumi Kamikaze Inc. | |
| # Copyright (c) 2013 The Octopus Apps Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License") | |
| # Author: Alejandro M. Bernardis | |
| # Email: alejandro.bernardis at gmail.com | |
| # Created: 21/06/2013 09:01 | |
| import os |
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
| _database = dict( | |
| database=options.database_name, | |
| replicaset=options.database_rset, | |
| hosts_or_uri=options.database_huri, | |
| host=options.database_host, | |
| port=options.database_port, | |
| max_pool_size=options.database_conn, | |
| auto_start_request=options.database_areq, | |
| use_greenlets=options.database_ugls, | |
| ) |
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
| # .bashrc | |
| export LC_CTYPE="en_US.UTF-8" |
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
| <div class="check-password-complexity" ng:show="password"> | |
| <small class="text-muted">La contraseña es: | |
| <strong class="text-{{complexity}}" | |
| ng:bind-html-unsafe="description"></strong> | |
| </small> | |
| <div class="progress"> | |
| <div class="progress-bar progress-bar-{{complexity}}" | |
| style="width: {{percentage}}%"></div> | |
| </div> | |
| </div> |
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
| cd ~ | curl -O https://gist.github.com/alejandrobernardis/5497458/raw/cfa73fdcadead945eddcdf10913228aa49c12ef8/install-env.sh | chmod +x install-env.sh | ./install-env.sh |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright (c) 2013 Asumi Kamikaze Inc. | |
| # Copyright (c) 2013 The Octopus Apps Inc. | |
| # Licensed under the Apache License, Version 2.0 (the "License") | |
| # | |
| # Author: Alejandro M. Bernardis | |
| # Email: alejandro.m.bernardis at gmail.com | |
| # Created: 4/6/13, 12:44 PM |
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 base64 | |
| import datetime | |
| import string | |
| import hashlib | |
| from random import choice | |
| def secret_key(length=64): | |
| h = '%s-%s-%s-%s' % ( | |
| datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S%f'), |