Skip to content

Instantly share code, notes, and snippets.

View neophob's full-sized avatar
😎

Michael Vogt neophob

😎
View GitHub Profile
@neophob
neophob / main.dart
Created September 1, 2021 19:15 — forked from devoncarew/main.dart
helloworld
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
for (int i = 0; i < 4; i++) {
print('hello ${i}');
}
}
@neophob
neophob / npm-prune.sh
Created October 25, 2018 20:03
npm prune
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean
@neophob
neophob / node_prune.sh
Last active November 19, 2017 16:14 — forked from gpittarelli/node_prune.sh
Prunes very-likely-uneeded files from node_modules directories
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean
@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 <dev@shirkey.me>
# 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
#
#######################################################################################################################
@neophob
neophob / PixelController Config
Created November 13, 2013 19:21
Config for #Issue42
#
# Copyright (C) 2011-2013 Michael Vogt <michu@neophob.com>
#
# 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: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 / 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 (jez.weston@yahoo.com)
Simplex noise code taken from Stephen Carmody's Java implementation at:
@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: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: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.