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
# $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:1125795
Created August 4, 2011 18:07
planing for dataS
///////////////// PIN
class BasePin //Ein base pin einfach damit wir einen pin so ohne spezifischen typen speichern können
{
public:
std::string name;
protected:
std::vector<int> connectableIds;
};
template <class type> //einen pin mit einem generischen type für operationen und funktionen am datentyp die immer gleich sind, zB type getData();
@underdoeg
underdoeg / gist:1145079
Created August 14, 2011 17:07
math stuff
#include "mathPlaygroundApp.h"
ofVec2f v1;
ofVec2f v2;
ofVec2f between;
//--------------------------------------------------------------
void mathPlaygroundApp::setup(){
ofSetWindowTitle("mathPlaygroundApp");
ofBackground(0,0,0);
@underdoeg
underdoeg / pythonGreenscreen.py
Created November 23, 2011 00:12
greenscreening with python and opencv (color differencing method)
import cv
import sys
import math
import os
import Image
USE_PYGAME = True
SHOW_RGB = False
mainWin = "RESULT"
@underdoeg
underdoeg / backtrace.log
Created November 24, 2011 13:07
exit openframeworks app with video grabber on linux error
0 0x00007ffff44fe3a5 raise
1 0x00007ffff4501b0b abort
2 0x00007ffff4dbcd7d __gnu_cxx::__verbose_terminate_handler ../../../../src/libstdc++-v3/libsupc++/vterminate.cc 95
3 0x00007ffff4dbaf26 __cxxabiv1::__terminate ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc 40
4 0x00007ffff4dbaf53 std::terminate ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc 50
5 0x00007ffff4dbb04e __cxxabiv1::__cxa_throw ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc 83
6 0x00000000004341b5 Poco::MutexImpl::lockImpl()
7 0x000000000049a81a ofGstUtils::close()
8 0x000000000049ae61 ofGstVideoUtils::~ofGstVideoUtils()
9 0x0000000000492b27 ofGstVideoGrabber::~ofGstVideoGrabber()
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
@underdoeg
underdoeg / ofxRaspberryPiWindow.h
Created October 25, 2012 19:14
basic openframework window to run on the raspberry pi (.h file)
/*==============================================================================
Copyright (c) 2011, 2012 Christopher Baker <http://christopherbaker.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@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);
@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;