Skip to content

Instantly share code, notes, and snippets.

View gist:3f1b995ce6fa6975df38df0c91c1aedb
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian-security/ stretch/updates main
deb-src http://deb.debian.org/debian-security/ stretch/updates main
deb http://deb.debian.org/debian stretch-updates main
deb-src http://deb.debian.org/debian stretch-updates main
View make
all: appimage
application: application.vala
valac --pkg gtksourceview-3.0 $< -o application
APPDIR=AppDir
appimage: application
$(shell [ -d ${APPDIR} ] && rm -r ${APPDIR}) # rm AppDir if exists
View MatrixM-for-standard-white-A.py
import numpy as np
# Source: http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
# chromaticity coordinates
# values are for sRGB (http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html)
xr, xg, xb = 0.6400, 0.3000, 0.1500
yr, yg, yb = 0.3300, 0.6000, 0.0600
# Reference Whites in XYZ, source: https://de.mathworks.com/help/images/ref/whitepoint.html
View TradfriConstants
package com.ikea.tradfri.lighting.ipso;
public class IPSOObjects {
public static final String AUTH_PATH = "9063";
public static final String CLIENT_IDENTITY_PROPOSED = "9090";
public static final String COLOR = "5706";
public static final String COLOR_X = "5709";
public static final String COLOR_Y = "5710";
public static final String COMMISSIONING_MODE = "9061";
public static final String CREATED_AT = "9002";
@r41d
r41d / tradpy.py
Last active Apr 6, 2017
Minimal flask Trådfri server
View tradpy.py
#!/usr/bin/env python
# -*- coding: utf-8 *-*
# TradPy, minimal working example for Trådfri web interface
# Copyright (C) 2017 Lennart Buhl
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
View alife-task33.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <unistd.h>
#include <signal.h>
#include <ncurses.h>
/*
View zettel1-aufgabe7.py
#!/usr/bin/env python
# -*- coding: utf-8 *-*
# not intended to be clean code (whole project was done in 20 minutes)
import pygame
from pygame.locals import K_SPACE, K_ESCAPE, KEYUP, KEYDOWN, QUIT
from random import randint, randrange
import os.path as path
from glob import glob
X = 640
View zettel1-aufgabe6.py
#!/usr/bin/env python
# -*- coding: utf-8 *-*
# not intended to be clean code (whole project was done in 20 minutes)
import pygame
from pygame.locals import K_SPACE, K_ESCAPE, KEYUP, KEYDOWN, QUIT
from random import randint, randrange
import os.path as path
from glob import glob
X = 640
@r41d
r41d / sl.c
Created Feb 7, 2016
stripped version of SL 5.02 in one file without any arguments or special features
View sl.c
/*========================================
* sl.c: SL version 5.02 - stripped
* Copyright 1993,1998,2014
* Toyoda Masashi
* (mtoyoda@acm.org)
* Last Modified: 2014/06/03
*========================================
*/
#define D51HEIGHT 9
View unicode_to_latex.py
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
unicode_to_latex = {
u"\u0020": "\\space ",
u"\u0023": "\\#",
u"\u0024": "\\textdollar ",
u"\u0025": "\\%",
u"\u0026": "\\&amp;",