Skip to content

Instantly share code, notes, and snippets.

View aeby's full-sized avatar
🗯️
Against oppression, hatred, racism, fascism and violence

Reto Aebersold aeby

🗯️
Against oppression, hatred, racism, fascism and violence
View GitHub Profile
@aeby
aeby / sem.py
Created November 16, 2016 22:14
Test Semaphore in shared memory
import time
from multiprocessing import Process, Semaphore
def task(s, i):
s.acquire()
print('Task', i)
time.sleep(2)
s.release()
@aeby
aeby / tabActive.js
Last active May 1, 2017 00:14
Workaround for Angular Material md-tab's md-active attribute triggering a click event (https://github.com/angular/material/issues/5351)
(function () {
'use strict';
angular
.module('material.components.tabs')
.directive('mdActiveNc', MdActiveNoClick);
function MdActiveNoClick() {
return {
link: link,
@aeby
aeby / file1.xml
Created September 16, 2015 15:20
Simple RxPy example
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<RANK>1</RANK>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
@aeby
aeby / hdpl.py
Created December 1, 2014 16:39
Upload source tarball to AWS and trigger Heroku deploy
#!/usr/bin/env python
"""
Upload source tarball to AWS and trigger Heroku deploy.
https://devcenter.heroku.com/articles/build-and-release-using-the-api
Create your source tarball using something like:
git archive -o source.tar.gz HEAD
If you like to extend your tarball:
git archive -o source.tar HEAD