Skip to content

Instantly share code, notes, and snippets.

Valentin Lab vaab

Block or report user

Report or block vaab

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vaab /
Created Mar 15, 2017
Fixing python 2.7 windows unicode issue with ``subprocess.Popen``.
## issue:
import ctypes
import subprocess
import _subprocess
from ctypes import byref, windll, c_char_p, c_wchar_p, c_void_p, \
Structure, sizeof, c_wchar, WinError
from ctypes.wintypes import BYTE, WORD, LPWSTR, BOOL, DWORD, LPVOID, \
vaab /
Created Jan 11, 2016 — forked from enaeseth/
Load YAML mappings as ordered dictionaries
import yaml
import yaml.constructor
# included in standard lib from Python 2.7
from collections import OrderedDict
except ImportError:
# try importing the backported drop-in replacement
# it's available on PyPI
from ordereddict import OrderedDict
vaab / docker-update
Last active Oct 19, 2018
View docker-update
## Updates an existing image with given script coming from stdin.
exname=$(basename $0)
usage="$exname DOCKER_IMAGE
Update image with stdin instruction.
vaab / .travis.yml
Created May 14, 2014
Travis config to use with ```` file.
View .travis.yml
language: python
- "3.4"
- "3.3"
- "2.7"
install: ./ && python install && python develop easy_install "$(./ --get-name)[test]"
- nosetests $(./ --get-name)
- git reset --hard HEAD ; git clean -d -f ; python sdist --formats=gztar && pip install "dist/$(./ --get-name)-$(./ --get-version | tr "_" "-").tar.gz" --upgrade
vaab /
Last active Mar 23, 2017
Common ```` to use with ```` along with a ``setup.cfg``.
#!/usr/bin/env python
## You can download latest version of this file:
## $ wget -O
## $ chmod +x
## This is meant to be run along with ``./`` that
## you can also find here:
vaab /
Last active Apr 12, 2017
tabs to space, depends fixes
## You can download latest version of this file:
## $ wget -O
## $ chmod +x
## Functions
vaab / map_canvas.css
Last active Oct 13, 2015
A google chart like Canvas widget for drawing circles and coloring region in "La Réunion"
View map_canvas.css
.tooltip_map {
font-size: 12px;
width: 200px;
position: absolute;
display: none;
z-index: 999;
padding: 3px;
margin: 0px;
border: 1px solid #efefef;
border-radius: 4px;
vaab / jslint-emacs-reporter.js
Created Sep 20, 2012
JSLint/JSHint emacs reporter
View jslint-emacs-reporter.js
/*jshint node: true */
var reporter_name = "jhlint";
module.exports = {
reporter: function (results, data) {
"use strict";
var str = '',
errors = [];
vaab /
Created Sep 20, 2012
Python script to combine pep8, pylint and hopefully other python code analyzer
#!/usr/bin/env python
# link:
# This is a script which runs and parses the output of various Python code
# checking programs to work with flymake. It has lots of issues, one being that
# flymake does not seem to show more than one error message per line of code,
# meaning that an error or warning which is intentionally left unfixed can mask
# an error or warning that would get more attention.
# Additionally, the scripts which check python code are either rather anemic,
You can’t perform that action at this time.