Skip to content

Instantly share code, notes, and snippets.

@msabramo
msabramo / gist:9281548
Created February 28, 2014 22:40
Show git branches with info about last commit
bash -c 'for k in `git branch -a|perl -pe s/^..//`;do echo -e `git show --pretty=format:"%Cgreen %ci %H %Cblue %<(35)%cN %<(25)%cr%Creset" $k|head -n 1` $k;done|sort -r'
@msabramo
msabramo / gist:10095169
Created April 8, 2014 05:48
python-jenkins test coverage
--------------------------------------------------------------- coverage: platform linux2, python 2.7.3-final-0 ----------------------------------------------------------------
Name Stmts Miss Cover Missing
------------------------------------------------
jenkins/__init__ 217 141 35% 152, 156, 161-170, 179-189, 201-209, 215-216, 224-234, 257-269, 283, 295, 315-325, 335, 344-348, 357-361, 369-373, 381-382, 391-392, 400-401, 410-417, 438-441, 452-461, 471-473, 483, 492-502, 510-514, 522-526, 535-538, 547-551, 567-602, 612-624
@msabramo
msabramo / gist:10155931
Created April 8, 2014 16:58
python-jenkins test results and coverage
py34 inst-nodeps: /home/vagrant/dev/bzr-repos/python-jenkins/python3/.tox/dist/python-jenkins-0.2.1.zip
py34 runtests: commands[0] | py.test --cov=jenkins --cov-report=xml --cov-report=term-missing tests
=================================================================================================================================================== test session starts ====================================================================================================================================================
platform linux -- Python 3.4.0 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 9 items
tests/test_jenkins.py .........
-------------------------------------------------------------------------------------------------------------------------------------- coverage: platform linux, python 3.4.0-final-0 --------------------------------------------------------------------------------------------------------------------------------------
Name Stmts Miss Cover Missing
@msabramo
msabramo / gist:10193094
Created April 8, 2014 21:11
python-jenkins tox results and 98% test coverage including Python 3!
vagrant@ubuntu:~/dev/bzr-repos/python-jenkins/python3$ tox
GLOB sdist-make: /home/vagrant/dev/bzr-repos/python-jenkins/python3/setup.py
py26 inst-nodeps: /home/vagrant/dev/bzr-repos/python-jenkins/python3/.tox/dist/python-jenkins-0.2.1.zip
py26 runtests: commands[0] | py.test --cov=jenkins --cov-report=xml --cov-report=term-missing tests
=================================================================================================================================================== test session starts ====================================================================================================================================================
platform linux2 -- Python 2.6.9 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 56 items
tests/test_jenkins.py ........................................................
@msabramo
msabramo / gist:10206466
Created April 8, 2014 23:05
python-jenkins 100% test coverage!
vagrant@ubuntu:~/dev/bzr-repos/python-jenkins/python3$ tox
GLOB sdist-make: /home/vagrant/dev/bzr-repos/python-jenkins/python3/setup.py
py26 inst-nodeps: /home/vagrant/dev/bzr-repos/python-jenkins/python3/.tox/dist/python-jenkins-0.2.1.zip
py26 runtests: commands[0] | py.test --cov=jenkins --cov-report=xml --cov-report=term-missing tests
============================================================================= test session starts ==============================================================================
platform linux2 -- Python 2.6.9 -- py-1.4.20 -- pytest-2.5.2
plugins: cov
collected 58 items
tests/test_jenkins.py ..........................................................
@msabramo
msabramo / gist:11068715
Created April 18, 2014 23:42
Failed attempt at using `python setup.py testr --coverage` to get coverage for jenkins-job-builder
marca@marca-mac2.local ⮀ git-repos/jenkins-job-builder ⮀ ⭠ tox_report_coverage ? ⮀ jenkins-job-builder ⮀
❯ tox -e cover
cover develop-inst-nodeps: /Users/marca/dev/git-repos/jenkins-job-builder
cover runtests: commands[0] | python setup.py testr --coverage
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ tests --list
Coverage.py warning: Module jenkins-job-builder was never imported.
Coverage.py warning: No data was collected.
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ tests --load-list /var/folders/gw/w0clrs515zx9x_55zgtpv4mm0000gp/T/tmpqodz4Y
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ tests --load-list /
@msabramo
msabramo / gist:11220104
Created April 23, 2014 15:32
Output of distutils.sysconfig.get_config_vars() for Python 2.7.6 built on OS X 10.8.5
In [7]: distutils.sysconfig.get_config_vars()
Out[7]:
{'AC_APPLE_UNIVERSAL_BUILD': 0,
'AIX_GENUINE_CPLUSPLUS': 0,
'AR': 'ar',
'ARFLAGS': 'rc',
'ASDLGEN': './Parser/asdl_c.py',
'ASDLGEN_FILES': './Parser/asdl.py ./Parser/asdl_c.py',
'AST_ASDL': './Parser/Python.asdl',
'AST_C': 'Python/Python-ast.c',
@msabramo
msabramo / Library_Frameworks_Python.Framework_Versions_2.7_bin_python_setup.py_bdist_egg_bdist_wheel.out.txt
Last active August 29, 2015 14:00
Output of `/Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py bdist_egg bdist_wheel` on my OS X 10.8.5 system
marca@56-201-37-107.sanjca.spcsdns.net ⮀ git-repos/python-gnureadline ⮀ master ? ⮀
❯ git last
ee3d609 Use a custom readline.c for Python 3.4
marca@56-201-37-107.sanjca.spcsdns.net ⮀ git-repos/python-gnureadline ⮀ master ? ⮀
❯ /Library/Frameworks/Python.framework/Versions/2.7/bin/python setup.py bdist_egg bdist_wheel | tee Library_Frameworks_Python.Framework_Versions_2.7_bin_python_setup.py_bdist_egg_bdist_wheel.out.txt
running bdist_egg
running egg_info
writing gnureadline.egg-info/PKG-INFO
writing top-level names to gnureadline.egg-info/top_level.txt
@msabramo
msabramo / setup.py
Created May 22, 2014 17:59
TextAnalysis setup.py
"""
** Copyright SurveyMonkey Thu, 08 Nov 2012 01:36:39 **
Source: devmonkeys/TextAnalysis *master c8777c9
Released by: larry1
"""
from setuptools import setup, find_packages
version = '50.0.3'
package main
import (
"fmt"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/osutil"
)
func main() {
provider, auth_options, err := osutil.AuthOptions()