Skip to content

Instantly share code, notes, and snippets.

View neophob's full-sized avatar
👋

Michael Vogt neophob

👋
View GitHub Profile
@neophob
neophob / gist:3141124
Created July 19, 2012 06:20
Stream node.js to struts
protected StreamInfo getStreamInfo(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
URL url = new URL("http://192.168.128.160:8001/grepper.htm");
HttpURLConnection httpcon = (HttpURLConnection) url.openConnection();
BufferedInputStream bis = new BufferedInputStream(httpcon.getInputStream());
ServletOutputStream out = response.getOutputStream();
log.debug("streamopen");
byte[] outputByte = new byte[4096];
@neophob
neophob / gist:4967797
Created February 16, 2013 17:23
PixelController DMX Configuration for PixelController v1.3.0, 10x15 Configuration
#
# Copyright (C) 2011-2013 Michael Vogt <[email protected]>
#
# This file is part of PixelController.
#
# PixelController 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.
#
@neophob
neophob / gist:5021637
Created February 23, 2013 22:29
PixelController config for Rainbowduino
#
# Copyright (C) 2011-2013 Michael Vogt <[email protected]>
#
# This file is part of PixelController.
#
# PixelController 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.
#
@neophob
neophob / gist:5315194
Created April 4, 2013 23:11
Arduino I2c slave
// Wire Slave Receiver
// by Nicholas Zambetti <http://www.zambetti.com>
// Demonstrates use of the Wire library
// Receives data as an I2C/TWI slave device
// Refer to the "Wire Master Writer" example for use with this
// Created 29 March 2006
// This example code is in the public domain.
@neophob
neophob / gist:5315200
Created April 4, 2013 23:12
ugly java hack
package com.neophob.com;
import com.pi4j.io.i2c.I2CBus;
import com.pi4j.io.i2c.I2CDevice;
import com.pi4j.io.i2c.I2CFactory;
public class I2CExample {
/**
@neophob
neophob / gist:5355467
Created April 10, 2013 15:11
jsp taglib, lazy loading
struts-action config (configure webservice):
<action
path="/show_xxx_XHR"
type="xxx.webapp.action.XXX_XHRAction"
name="dummyForm"
scope="request"
input="failure"
parameter="method"
@neophob
neophob / gist:5358858
Created April 10, 2013 22:02
stripinvaders addon
/*
Fireplace and Perlin Noise colour effect for a WS2801 addressable RGB LED strip.
By Ruben VC
Swapped R and B to compensate LPD8066 vs WS2801 in Fireplace code.
Based on fast and smooth random colour patterns for a LPD8066 addressable RGB LED strip.
By happyinmotion ([email protected])
Simplex noise code taken from Stephen Carmody's Java implementation at:
@neophob
neophob / gist:5443241
Created April 23, 2013 12:41
XHR Action
public ActionForward execute(ActionMapping mapping, ActionForm inForm, HttpServletRequest request, HttpServletResponse response) throws Exception {
log.debug("hello ajax!");
DatatablesCriterias dc = DatatablesCriterias.getFromRequest(request);
log.debug(dc);
AssettypeManager mgr = (AssettypeManager) getBean("assettypeManager");
List<AssetType> tmp = mgr.getAssetTypeList();
List<AssetType> assetType = new ArrayList<AssetType>();
@neophob
neophob / PixelController Config
Created November 13, 2013 19:21
Config for #Issue42
#
# Copyright (C) 2011-2013 Michael Vogt <[email protected]>
#
# This file is part of PixelController.
#
# PixelController 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.
#
@neophob
neophob / install_dokku_to_debian_wheezy
Last active August 29, 2015 14:02 — forked from shirkey/install_dokku_to_debian_wheezy
works for dokku v0.2.3 aswell
#######################################################################################################################
#
# Purpose: Bash script to fix a few elements of the default Dokku script with running correctly on Debian Wheezy
# Author: Shirkey <[email protected]>
# License: MIT
# Tested with:
# * Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux
# * v0.2.1 of Dokku installer script
#
#######################################################################################################################