6:30 - 6:40: settling in
6:40 - 7:00: Julian, quick introduction to PyPy
7:00 - 7:10: Andy, quick introduction to CLI
7:10 - 7:15: James, NYC Python announcements
7:15 - 8:30: James, CPython workshop
8:30 - 9:00: mingling + sponsor announcements
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
| ansible-playbook -i inventory create-ec2-instance.yml --limit dev-web-server-78a -vv | |
| Traceback (most recent call last): | |
| File "/usr/local/bin/ansible-playbook", line 309, in <module> | |
| sys.exit(main(sys.argv[1:])) | |
| File "/usr/local/bin/ansible-playbook", line 150, in main | |
| inventory = ansible.inventory.Inventory(options.inventory, vault_password=vault_pass) | |
| File "/usr/local/lib/python2.7/site-packages/ansible/inventory/__init__.py", line 100, in __init__ | |
| self.parser = InventoryDirectory(filename=host_list) | |
| File "/usr/local/lib/python2.7/site-packages/ansible/inventory/dir.py", line 58, in __init__ | |
| parser = InventoryParser(filename=fullpath) |
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
| # This will cause full debug output to go to the console | |
| import boto | |
| boto.set_stream_logger('foo') | |
| ec2 = boto.connect_ec2(debug=2) |
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
| umask 002 | |
| # User specific aliases and functions | |
| alias rm='rm -i' | |
| alias cp='cp -i' | |
| alias mv='mv -i' | |
| alias bp='vim ~/.bash_profile' | |
| alias sbp='source ~/.bash_profile' | |
| alias cls='clear' |
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
| # Link a list of sites from the playbook | |
| {% for sitename in nginx.sitenames %} | |
| - name: link nginx sites | |
| file: src=/etc/nginx/sites-available/{{ sitename }}.conf dest=/etc/nginx/sites-enabled/{{ sitename }}.conf state=link | |
| {% endfor %} |
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
| openssl genrsa -des3 -out trexglobal.com.key 4096 | |
| openssl req -new -key trexglobal.com.key -out trexglobal.com.csr | |
| cp -v trexglobal.com.{key,original} | |
| openssl rsa -in trexglobal.com.original -out trexglobal.com.key | |
| rm -v trexglobal.com.original | |
| openssl x509 -req -days 9999 -in trexglobal.com.csr -signkey trexglobal.com.key -out trexglobal.com.crt |
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
| //============================================================================== | |
| // Casper generated Sun Jan 26 2014 10:54:09 GMT-0500 (EST) | |
| //======================c======================================================== | |
| var x = require('casper').selectXPath; | |
| ERROR: the recorded sequence does not start with a url openning. | |
| casper.waitForSelector(".main-nav a:nth-child(2) .nav-in", | |
| function success() { | |
| test.assertExists(".main-nav a:nth-child(2) .nav-in"); | |
| this.click(".main-nav a:nth-child(2) .nav-in"); |
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
| upstream mysite { | |
| server unix:/tmp/gunicorn.sock fail_timeout=0; | |
| } | |
| upstream php5-fpm { | |
| server unix:/var/run/php5-fpm.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name mysite.com; |
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
| <filter> | |
| <whitelist> | |
| <directory suffix=".php">sites</directory> | |
| <directory suffix=".inc">sites</directory> | |
| <directory suffix=".install">sites</directory> | |
| <directory suffix=".module">sites</directory> | |
| <directory suffix=".php">profiles</directory> | |
| <directory suffix=".inc">profiles</directory> | |
| <directory suffix=".install">profiles</directory> | |
| <directory suffix=".module">profiles</directory> |
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
| untitled text 3.txt | |
| untitled text 31.txt | |
| #!/usr/bin/env python | |
| import boto | |
| import argparse | |
| import time, datetime, sys, logging, socket, re | |
| from dateutil.relativedelta import relativedelta | |
| def get_creds(): |