Skip to content

Instantly share code, notes, and snippets.

View mchwalisz's full-sized avatar

Mikołaj Chwalisz mchwalisz

View GitHub Profile
@mchwalisz
mchwalisz / setup.py
Created August 1, 2017 13:05 — forked from nloadholtes/setup.py
An example of using the git hash/tag as a version number
from setuptools import setup, find_packages
import subprocess
def _get_version_hash():
"""Talk to git and find out the tag/hash of our latest commit"""
try:
p = subprocess.Popen(["git", "describe",
"--tags", "--dirty", "--always"],
stdout=subprocess.PIPE)
except EnvironmentError:
@mchwalisz
mchwalisz / git-latexdiff.PKGBUILD
Created July 28, 2017 07:39 — forked from sebastianst/git-latexdiff.PKGBUILD
PKGBUILD of git-latexdiff AUR Package
# Maintainer: Benjamin Chrétien <chretien at lirmm dot fr>
# Contributor: Sebastian Stammler <base64 -d<<<c2ViQGhkZG4uc3BhY2UK>
pkgname=git-latexdiff
pkgver=1.2.0
pkgrel=1
pkgdesc="Simple but very convenient wrapper around Git and latexdiff"
arch=('any')
url="https://gitlab.com/git-latexdiff/git-latexdiff"
license=('BSD')
depends=('texlive-core' 'texlive-bin' 'git')
@mchwalisz
mchwalisz / twist.py
Last active October 20, 2015 12:04
Python interface to TWIST sensor testbed
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
twist.py: Command line interface to TWIST testbed
Usage:
twist.py [options] [-q | -v] ([-n <nodeid>]... | [--floor <floor>]... | --all )
twist.py --config
@mchwalisz
mchwalisz / keybase.md
Created April 15, 2015 06:53
keybase.md

Keybase proof

I hereby claim:

  • I am mchwalisz on github.
  • I am mchwalisz (https://keybase.io/mchwalisz) on keybase.
  • I have a public key whose fingerprint is 8A62 1675 1437 B3B5 5CCE 611E 662B 4026 9083 AE1B

To claim this, I am signing this object:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
import thread
import time
import zmq
# global zmg context
context = zmq.Context.instance()
endpoint = "tcp://*:8888"
# the subscriber thread function
def subscriber(name, address, cnt, subscriptions):
@mchwalisz
mchwalisz / email.sh
Created August 6, 2014 12:42 — forked from fuzzmz/email.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: SystemEmail
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Send email
# Description: Sends an email at system start and shutdown
### END INIT INFO
@mchwalisz
mchwalisz / humidity-arm.rrd
Last active August 29, 2015 14:03
cgp_issue_19
@mchwalisz
mchwalisz / foobar.py
Last active October 7, 2016 07:34
Python: Empty script with docopt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
foobar.py: Does really cool stuff
Usage:
foobar.py [options] [-q | -v]
foobar.py --config