Skip to content

Instantly share code, notes, and snippets.

View aodj's full-sized avatar
⌨️

Alexander O'Donovan-Jones aodj

⌨️
  • Reykjavik, Iceland
View GitHub Profile
@aodj
aodj / create_virtualenv.sh
Last active August 29, 2015 14:05
step #1
#!/bin/sh
tar xvzf virtualenv-1.11.6.tar.gz
cd virtualenv-1.11.6
sudo python virtualenv.py ../$1
@aodj
aodj / requirements.txt
Created August 22, 2014 16:57
Output from pip freeze
(venv) C:\testvenv> pip freeze
Jinja2==2.7.3
MarkupSafe==0.23
Pillow==2.5.1
PyYAML==3.11
beautifulsoup4==4.3.2
coverage==3.7.1
docopt==0.6.2
mock==1.0.1
nose==1.3.3
@aodj
aodj / create_virtualenv.bat
Last active August 29, 2015 14:05
step #4
:: extract source
call bsdtar.exe xvzf virtualenv-1.11.6.tar.gz
:: switch directories
cd virtualenv-1.11.6
:: make the virtualenv
python virtualenv.py ..\%1
:: install the dependencies
@aodj
aodj / create_virtualenv.bat
Last active August 29, 2015 14:05
step #3
:: http://www.robvanderwoude.com/ntregistry.php
echo Checking registry for existing Python install path under "HKCU\Software\Python\PythonCore\2.7\InstallPath"
:: query the registry, parse it's output and if we get anything, save it as %installpath%
:: delims is a TAB followed by a space
for /f "tokens=2* delims= " %%A in ('reg query "HKCU\Software\Python\PythonCore\2.7\InstallPath"') do set installpath=%%B
:: if we've got a value in %installpath%, save it out to disk for restoration later
if not "%installpath%"=="" call reg export "HKCU\Software\Python\PythonCore\2.7\InstallPath" installpath.reg && echo Found existing InstallPath, saving to installpath.reg
:: update the registry with the path to our virtualenv
@aodj
aodj / create_virtualenv.bat
Last active August 29, 2015 14:05
step #2
:: extract source
call bsdtar.exe xvzf virtualenv-1.11.6.tar.gz
:: switch directories
cd virtualenv-1.11.6
:: make the virtualenv
python virtualenv.py ..\%1
:: install the dependencies
@aodj
aodj / create_virtualenv.bat
Last active August 29, 2015 14:05
step #1
:: extract source
call bsdtar.exe xvzf virtualenv-1.11.6.tar.gz
:: switch directories
cd virtualenv-1.11.6
:: make the virtualenv
python virtualenv.py ..\%1
:: install the dependencies