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 -*- | |
''' | |
Bootstrapping the salt minions on Rackspace (using fabric rather than | |
salt-cloud). | |
This is not the most effective way to do this, but it gets it 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
root@prod03:/var/log# cat supervisor/nbviewer-stderr---supervisor-r3dISD.log | |
2013-10-17 17:10:49 [17848] [INFO] Starting gunicorn 18.0 | |
2013-10-17 17:10:49 [17848] [INFO] Listening at: http://0.0.0.0:8080 (17848) | |
2013-10-17 17:10:49 [17848] [INFO] Using worker: sync | |
2013-10-17 17:10:49 [17859] [INFO] Booting worker with pid: 17859 | |
2013-10-17 17:10:49 [17864] [INFO] Booting worker with pid: 17864 | |
2013-10-17 17:10:49 [17869] [INFO] Booting worker with pid: 17869 | |
/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/IPython/utils/path.py:304: UserWarning: IPython parent '/usr/share/nbviewer' is not a writable location, using a temp directory. | |
" using a temp directory."%parent) | |
/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/IPython/utils/path.py:304: UserWarning: IPython parent '/usr/share/nbviewer' is not a writable location, using a temp 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
[2013-10-17 20:03:15,960] ERROR: Exception on /create/ [POST] | |
Traceback (most recent call last): | |
File "/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/flask/app.py", line 1687, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/flask/app.py", line 1360, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/flask/app.py", line 1358, in full_dispatch_request | |
rv = self.dispatch_request() | |
File "/usr/share/nbviewer/venv/local/lib/python2.7/site-packages/flask/app.py", line 1344, in dispatch_request | |
return self.view_functions[rule.endpoint](**req.view_args) |
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
In [36]: composite_regex = re.compile(r"^1?$|^(11+?)\1+$") | |
In [37]: for ii in range(256): | |
print("%03d %s %s" % (ii, ii*"1", "" if composite_regex.match("1"*ii) else "- Prime!" )) | |
....: | |
000 | |
001 1 | |
002 11 - Prime! | |
003 111 - Prime! | |
004 1111 |
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
" Search and replace simple anonymous js function that returns to coffeescript | |
%s/function(\([^)]*\))\s*{\s*return\s*\([^}]*\);\s*}/(\1) -> ( \2 )/cg |
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
iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 5000 | |
iptables-save |
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
## | |
## NOTE: This script is a walkthrough and may not work if run directly. | |
## | |
## If downloaded to run, make sure to set | |
## | |
## Set-ExecutionPolicy RemoteSigned | |
## | |
# Create a downloader via .NET | |
$notwget = New-Object System.Net.WebClient |
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
19:03:39 ~/code/wat/so_test$ git status | |
fatal: Not a git repository (or any of the parent directories): .git | |
19:05:19 ~/code/wat/so_test$ git init | |
fatal: bad config file line 1 in /Users/kyle6475/code/wat/so_test/.git/config | |
19:05:22 ~/code/wat/so_test$ rm .git/config | |
19:05:29 ~/code/wat/so_test$ git init | |
Reinitialized existing Git repository in /Users/kyle6475/code/wat/so_test/.git/ | |
19:05:33 ~/code/wat/so_test$ git status | |
fatal: Not a git repository (or any of the parent directories): .git |
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
10:19:27 ~$ nova keypair-add --pub-key ~/.ssh/id_rsa.pub kyle | |
10:19:43 ~$ nova boot perf_kaggle --image dee7f62b-cbb1-4fdc-8dc5-33e408d8c599 --flavor performance2-15 --poll --key-name kyle |
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
# Image is Ubuntu 13.04 w/ PVHVM Beta | |
# Flavor is the smallest of the performance 2 instances | |
nova boot saltmaster --image 62df001e-87ee-407c-b042-6f4e13f5d7e1 --flavor performance2-15 --poll --key-name kyle_grass --disk-config=AUTO |