Skip to content

Instantly share code, notes, and snippets.

View chrisma's full-sized avatar

Christoph Matthies chrisma

View GitHub Profile
@chrisma
chrisma / README.md
Created June 4, 2021 09:44 — forked from drozzy/README.md
FMC (http://www.fmc-modeling.org/) compositional and dynamic elements draw.io libraries

ABOUT

This is just some stencils I created for myself to draw FMC (http://www.fmc-modeling.org/) diagrams with draw.io.

Here is how they look:

lib_fmc_compositional

lib_fmc_dynamic

@chrisma
chrisma / GetNameAndTitleOfActiveWindow.scpt
Created May 20, 2021 08:21 — forked from timpulver/GetNameAndTitleOfActiveWindow.scpt
[AppleScript] Get Name of active window | Returns the name / title of the active (frontmost) window
# taken from user Albert's answer on StackOverflow
# http://stackoverflow.com/questions/5292204/macosx-get-foremost-window-title
# tested on Mac OS X 10.7.5
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to first application process whose frontmost is true
set frontAppName to name of frontApp
@chrisma
chrisma / gist:437820ce15db30770975e47750c7dd0e
Last active December 11, 2018 15:12 — forked from barentsen/gist:bacd4360fb31e7456d659d07b014e834
How to get clickshare working on Ubuntu
sudo apt install libresample1
http://mirrors.kernel.org/ubuntu/pool/universe/liba/libav/libavutil52_9.20-0ubuntu0.14.04.1_amd64.deb
sudo gdebi libavutil52_9.18-0ubuntu0.14.04.1_amd64.deb
http://security.ubuntu.com/ubuntu/pool/universe/liba/libav/libswscale2_9.20-0ubuntu0.14.04.1_amd64.deb
sudo gdebi libswscale2_9.18-0ubuntu0.14.04.1_amd64.deb
# Download clickshare deb
# https://drive.google.com/drive/folders/0B9IKZqXvLKM_Yno1UmpGLVRXNDg
# https://drive.google.com/file/d/0B9IKZqXvLKM_QzF4aTlRNVV5Wk0/view
sudo gdebi clickshare_01.07.01-79_amd64.deb
@chrisma
chrisma / latex-cheatsheet-template.tex
Created September 22, 2017 11:52 — forked from alexander-yakushev/latex-cheatsheet-template.tex
Beautiful cheatsheet template for key bindings, compiled with XeLaTeX
\documentclass[10pt,english,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage[landscape]{geometry}
\usepackage{color,graphicx,overpic}
\usepackage[T1]{fontenc}
\usepackage[bitstream-charter]{mathdesign}
\usepackage[utf8]{inputenc}
\usepackage{url}
@chrisma
chrisma / getCache.js
Last active February 16, 2017 15:27 — forked from contolini/getCache.js
Adaptation of jQuery's $.getJSON() to use localStorage for caching. Supports invalidation after timeout.
/*
Return JSON from url, use browser's localStorage as cache
JQuery extension, returns a promise.
'cacheInvalidMs' indicates the milliseconds after which the cache is invalidated.
Default is 24 hours.
'cacheDelayMs' indicates the milliseconds after which data from the cache is returned.
Can be used to simulate the delay of normal requests.
Default is 0.
*/
//Adapted from https://gist.github.com/contolini/6115380
@chrisma
chrisma / soundboard.py
Last active April 25, 2017 15:02 — forked from lehmannro/soundboard.py
Video board for terminal use
#!/usr/bin/env python
import csv
import itertools
import os
import subprocess
import sys
import termios
import tty
import logging
@chrisma
chrisma / boilerplate.py
Created April 29, 2012 08:22 — forked from ssokolow/boilerplate.py
Python boilerplate
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""[application description]"""
__appname__ = "[application name]"
__author__ = "[author]"
__version__ = "0.0"
__license__ = "GNU GPL 3.0 or later"
import logging, argparse