Skip to content

Instantly share code, notes, and snippets.

View msabramo's full-sized avatar

Marc Abramowitz msabramo

View GitHub Profile
@msabramo
msabramo / output.txt
Last active August 29, 2015 14:20
Tox keeps executing commands even when one fails
$ tox --version
1.9.0 imported from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tox/__init__.pyc
$ tox
py27 runtests: PYTHONHASHSEED='1229193552'
py27 runtests: commands[0] | echo 1
1
py27 runtests: commands[1] | false
ERROR: InvocationError: '/usr/bin/false'
py27 runtests: commands[2] | echo 2
@msabramo
msabramo / gist:d3b7bc49b1f2414e372d
Created March 27, 2015 14:53
Error installing MsSqlServer2012Express on Hyper-V Server with Chocolatey
C:\Program Files\Microsoft SQL Server\110>choco install -y mssqlserver2012express
Chocolatey (v0.9.8.33) is installing 'mssqlserver2012express' and dependencies.
By installing you accept the license for 'mssqlserver2012express' and each dependency you are installing.
MsSqlServer2012Express v11.00.3000.20140928
Downloading SqlServer2012Express 64 bit
from 'http://download.microsoft.com/download/5/2/9/529FEF7B-2EFB-439E-A2D1-A1533227CD69/SQLEXPRWT_x64_ENU.exe'
Installing SqlServer2012Express...
Write-Error : [ERROR] Running C:\Users\ADMINI~1\AppData\Local\Temp\1\chocolatey
\SqlServer2012Express\SqlServer2012ExpressInstall.exe with /q /INDICATEPROGRESS
@msabramo
msabramo / gist:d983f597ea20d261ff2f
Created February 9, 2015 18:34
freezegun pypy test failures
======================================================================
ERROR: tests.test_class_import.test_start_and_stop_works
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/marca/dev/git-repos/freezegun/.tox/pypy3/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/Users/marca/dev/git-repos/freezegun/tests/test_class_import.py", line 37, in test_start_and_stop_works
freezer = freeze_time("2012-01-14")
File "/Users/marca/dev/git-repos/freezegun/freezegun/api.py", line 366, in freeze_time
return _freeze_time(time_to_freeze, tz_offset, ignore)
@msabramo
msabramo / pyclean.sh
Created February 5, 2015 19:26
pyclean
pyclean () {
noglob find . \( -name '*.pyc' -or -name '__pycache__' \) -exec rm -rf {} +
}
@msabramo
msabramo / http.json
Created January 8, 2015 16:24
JSON grammar for parsing HTTP requests and responses to syntax highlight them (for Atom, GitHub, etc.)
{
"scopeName": "text.http",
"name": "HTTP",
"fileTypes": [
"http"
],
"patterns": [
{
"match": "^([A-Z]+) (/apps) (HTTP/1.1)$",
"comment": "E.g.: GET /path/to/page HTTP/1.1",
@msabramo
msabramo / pip_refactor.patch
Created December 17, 2014 21:32
Big pip refactoring to move path_to_url and url_to_path to pip/utils.py
diff --git a/pip/cmdoptions.py b/pip/cmdoptions.py
index a4ef0b7..7b17604 100644
--- a/pip/cmdoptions.py
+++ b/pip/cmdoptions.py
@@ -11,8 +11,8 @@ from __future__ import absolute_import
import copy
from optparse import OptionGroup, SUPPRESS_HELP, Option
-from pip.index import PyPI
from pip.locations import CA_BUNDLE_PATH, USER_CACHE_DIR, src_prefix
@msabramo
msabramo / gist:b3a12a570e49fd1a1858
Created December 17, 2014 16:27
virtualenv error creating py3 env
❯ virtualenv --python python3.3 py33
Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 41, in <module>
import ConfigParser
ImportError: No module named 'ConfigParser'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
@msabramo
msabramo / gist:6a321caa5e21e3ec03f8
Created December 17, 2014 16:23
virtualenv error Python 3
❯ /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -mvirtualenv --setuptools --python /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3 py33
Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/virtualenv.py", line 41, in <module>
import ConfigParser
ImportError: No module named 'ConfigParser'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
@msabramo
msabramo / gist:b2f73bb72e4a4c2cab73
Created December 17, 2014 16:16
tox error with Python 3
[marca@marca-mac2 readme]$ tox -r -e py33
GLOB sdist-make: /Users/marca/dev/git-repos/readme/setup.py
py33 create: /Users/marca/dev/git-repos/readme/.tox/py33
ERROR: invocation failed (exit code 1), logfile: /Users/marca/dev/git-repos/readme/.tox/py33/log/py33-0.log
ERROR: actionid=py33
msg=getenv
cmdargs=['/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', '-mvirtualenv', '--setuptools', '--python', '/Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3', 'py33']
env={'GOPATH': '/Users/marca/go', 'VIRTUAL_ENV_DISABLE_PROMPT': '1', 'LESS_TERMCAP_md': '\x1b[01;31m', 'HOMEBREW_CASK_OPTS': '--appdir=/Applications', 'rvm_niceness': '', 'LESS': '-F -g -i -M -R -S -w -X -z-4', 'rvm_gemstone_package_file': '', 'rvm_path': '/Users/marca/.rvm', 'LESSOPEN': '| /usr/bin/env lesspipe.sh %s 2>&-', 'TMPDIR': '/var/folders/gw/w0clrs515zx9x_55zgtpv4mm0000gp/T/', 'RUBY_VERSION': 'ruby-2.1.2', 'DOCKER_HOST': 'tcp://172.16.42.43:4243', 'LOGNAME': 'marca', 'USER': 'marca', 'r
exporting patches:
# HG changeset patch
# User Marc Abramowitz <[email protected]>
# Date 1418102744 28800
# Branch markdown-readme-1
# Node ID 1b4f37c1b9f6839c4c835cbe1a38f2017fa014ec
# Parent 58c3f40321becbbcb3ac2b28cd4995931bf2a332
Add tests for markdown rendering
diff --git a/tests/test_description_utils_markdown.py b/tests/test_description_utils_markdown.py