Skip to content

Instantly share code, notes, and snippets.

View underdoeg's full-sized avatar
💭
I may be slow to respond.

Philip Whitfield underdoeg

💭
I may be slow to respond.
View GitHub Profile
@underdoeg
underdoeg / createKTX.cpp
Created November 24, 2016 20:03
Create mipmap ktx textures from png files with freetype and gli
#include <cstring>
#include "cxxopts.hpp"
#include <iostream>
#include "gli/type.hpp"
//#include "gli/texture2d.hpp"
#include "gli/convert.hpp"
#include "gli/copy.hpp"
#include "gli/generate_mipmaps.hpp"
#include "gli/save.hpp"
#include <FreeImage.h>
@underdoeg
underdoeg / main.cpp
Created August 5, 2016 09:09
Simple property animation with cluttermm
#include <cluttermm.h>
#include <gdkmm/wrap_init.h>
#include <gdkmm/pixbuf.h>
#include <iostream>
int main(int argc, char *argv[])
{
Glib::init(); //Otherwise Gdk::wrap_init() will fail.
@underdoeg
underdoeg / SCsub
Created June 11, 2016 14:35
godot serial hints
# SCsub
Import('env')
env.Append(CPPPATH = ['libs/libserial/src/')]
env.add_source_files(env.modules_sources,"libs/libserial/src/*.cc")
env.add_source_files(env.modules_sources,"libs/libserial/src/*.cpp")
env.add_source_files(env.modules_sources,"*.cpp")
@underdoeg
underdoeg / hx711.py
Last active August 26, 2023 23:33
Python port for RaspberryPI of the HX711 Breakout Board
import RPi.GPIO as GPIO
import time
def createBoolList(size=8):
ret = []
for i in range(8):
ret.append(False)
return ret
from collections import namedtuple
from math import sqrt
import random
try:
import Image
except ImportError:
from PIL import Image, ImageDraw
import matplotlib.pyplot as plt
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
# Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
# Contributor: David Keogh <davekeogh@archlinux.us>
# Contributor: Philip Whitfield <public@underdoeg.com>
pkgname=pycharm-community
pkgver=3.1.1
pkgrel=1
pkgdesc="Powerful Python and Django IDE. Community edition."
arch=('any')
@underdoeg
underdoeg / gist:8174076
Last active January 1, 2016 16:59
black box debian

Notizen zur Installation

Debian

  • Debian Small Installation image laden http://www.debian.org/distrib/
  • Beim Installieren darauf achten, dass keine GUI mitinstalliert wird
  • Nachträglich xorg installieren sudo apt-get install xorg
  • Xorg so konfigureren, dass jeder user startx ausführen kann dpkg-reconfigure xserver-common

DWM

  • dwm runter laden von http://dwm.suckless.org/ oder git clone http://git.suckless.org/dwm
  • dwm anpassen (config.h editieren, showbar=False, topbar = False) und kompilieren mit make

X11

@underdoeg
underdoeg / main.cpp
Last active December 26, 2015 05:59
gstreamer network sync server
#include <gst/gst.h>
#include <glib.h>
#include <sstream>
#include <iostream>
#include <gst/net/gstnet.h>
#include <stdio.h>
#include "inetserverstream.hpp"
#include "exception.hpp"
#include "socket.hpp"
@underdoeg
underdoeg / main.cpp
Last active December 26, 2015 05:59
gstreamer network sync client
#include <gst/gst.h>
#include <gst/net/gstnet.h>
#include <glib.h>
#include <sstream>
#include <iostream>
#include <stdio.h>
#include <inetclientstream.hpp>
#include <exception.hpp>
using namespace std;
@underdoeg
underdoeg / gist:5658717
Created May 27, 2013 19:33
ofBuffer handling
int size = 255*255;
char* blah = new char[size];
for(int i=0;i<size;i++)
blah[i] = (char)(int)ofRandom(-255, 255);
ofBuffer buffer;
buffer.append(blah, size);
ofBufferToFile("test.pcm", buffer);