This file contains 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
from gevent.monkey import patch_all; patch_all() | |
import subprocess as sp | |
import gevent | |
import time | |
import io | |
import sys | |
from contextlib import contextmanager | |
class read_with_timeout: |
This file contains 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
0 info it worked if it ends with ok | |
1 verbose cli [ 'node', | |
1 verbose cli '/Users/sean/anaconda/envs/_build/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli 'git://github.com/srossross/node-authenticate-pam.git' ] | |
2 info using npm@2.7.3 | |
3 info using node@v0.10.35 | |
4 warn package.json wnext@0.0.0 No repository field. | |
5 silly cache add args [ 'git://github.com/srossross/node-authenticate-pam.git', null ] | |
6 verbose cache add spec git://github.com/srossross/node-authenticate-pam.git |
This file contains 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
## psudo code for conda create | |
conda = Conda() | |
print conda.cache_locations | |
print conda.default_cache_location | |
print conda.env_locations # list of places to search for environemtns | |
print conda.default_env_location # environment prefix to install new envs |
This file contains 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 ctypes, os, signal, select | |
def wait_for_read_windows(fd): | |
import msvcrt | |
from ctypes import wintypes | |
WaitForMultipleObjects = ctypes.windll.kernel32.WaitForMultipleObjects | |
WaitForMultipleObjects.argtypes = [wintypes.DWORD, | |
ctypes.POINTER(wintypes.HANDLE), |
This file contains 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
pysubl (){ | |
### Function to open python module in sublime text editor | |
### Usage example: pysubl this | |
xpyc=`python -c "import sys; stdout = sys.stdout; sys.stdout = sys.stderr; import $1; stdout.write($1.__file__)"` | |
if [ "$xpyc" == "" ]; then | |
echo "Python module $1 not found" | |
elif [[ $xpyc == *__init__.py* ]]; then |
This file contains 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
mr_chomps:express-blueprints sean$ npm publish | |
npm http PUT https://registry.npmjs.org/express-blueprints | |
npm http 403 https://registry.npmjs.org/express-blueprints | |
npm ERR! publish Failed PUT 403 | |
npm ERR! Error: forbidden Cannot replace previously published version: 0.0.1: express-blueprints | |
npm ERR! at RegClient.<anonymous> (/Users/sean/anaconda/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:237:14) | |
npm ERR! at Request.self.callback (/Users/sean/anaconda/lib/node_modules/npm/node_modules/request/request.js:123:22) | |
npm ERR! at Request.EventEmitter.emit (events.js:98:17) | |
npm ERR! at Request.<anonymous> (/Users/sean/anaconda/lib/node_modules/npm/node_modules/request/request.js:893:14) | |
npm ERR! at Request.EventEmitter.emit (events.js:117:20) |
This file contains 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
mr_chomps:express-blueprints sean$ npm publish | |
npm http PUT https://registry.npmjs.org/express-blueprints | |
npm http 503 https://registry.npmjs.org/express-blueprints | |
npm ERR! registry error parsing json | |
npm http PUT https://registry.npmjs.org/express-blueprints | |
^Cmr_chomps:express-blueprints sean$ npm publish | |
npm http PUT https://registry.npmjs.org/express-blueprints | |
npm http 201 https://registry.npmjs.org/express-blueprints | |
npm http GET https://registry.npmjs.org/express-blueprints | |
npm http 200 https://registry.npmjs.org/express-blueprints |
This file contains 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
Build 14.0 Sumitted id:530cbd35f53f2a3ebc615bb4 | |
This build is in the build queue ... | |
... Build popped off queue | |
Start build binstar/binstar 14.0 -- id:530cbd35f53f2a3ebc615bb4 | |
Start build | |
Setting engine | |
conda create -n install --quiet --yes python=2 | |
Package plan for installation in environment /opt/anaconda/envs/install: |
This file contains 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 build is in the build queue ... | |
... Build popped off queue | |
Start build sean/libdynd_build_test 1.0 -- id:52f3ce1cf53f2a4d0d9fc031 | |
Start build | |
Setting engine | |
conda install --quiet --yes python=2 | |
# All requested packages already installed. | |
# packages in environment at /opt/anaconda: | |
# | |
python 2.7.6 1 |
This file contains 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
sudo iptables -t nat -F | |
sudo iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080 | |
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 |