Skip to content

Instantly share code, notes, and snippets.

...
UDP: Unknown data received : 4efa0038000100ca020000004efc0038000100ca0e000000
UDP: Next message will be : 4efc0038000100ca0e000000
UDP: Unknown data received : 4efc0038000100ca0e000000
UDP: Next message will be :
UDP: Unknown data received : 4efe0038000100ca050000004e000138000100ca06000000
UDP: Next message will be : 4e000138000100ca06000000
UDP: Unknown data received : 4e000138000100ca06000000
UDP: Next message will be :
UDP: Discarding double message (-0) from 1
@daniel-j
daniel-j / trackdrag.coffee
Created November 12, 2014 22:06
Some useful Marionette behaviors!
class Behavior.TrackDrag extends Marionette.Behavior
events:
dragstart: 'start'
dragenter: 'enter'
dragleave: 'leave'
dragend: 'leave'
dragover: 'over'
drop: 'drop'
start: (e) ->
@daniel-j
daniel-j / .gitignore
Last active August 29, 2015 14:10
Take a photo with a system camera using a button connected to GPIO!
trigger-camera
@daniel-j
daniel-j / 2048.c.yml
Last active August 29, 2015 14:17
2048.c
name: "2048.c"
version: git
runner: linux
game_slug: "2048-c"
game:
exe: "/usr/bin/gnome-terminal"
args: -e "$GAMEDIR/2048"
files:
@daniel-j
daniel-j / _radio.sh
Created May 15, 2015 20:54
Galaxy News Radio (MPD + Python)
#!/bin/bash
cd ${0%/*}
sock="`pwd`/mpd/socket"
function addList {
LIST=`python2 create-show.py`
IFS=$'\n';
// FRAGMENT SHADER
precision mediump float;
uniform vec2 u_position;
uniform vec3 u_palette[256];
void main() {
int index = 5;
vec3 palColor = u_palette[index];
// VERTEX SHADER
attribute vec2 a_position;
uniform vec2 u_resolution;
uniform vec3 u_palette[256];
varying vec3 v_color;
void main() {
var leftleggeo = new THREE.CubeGeometry(4, 12, 4);
var leftleg = new THREE.Mesh(leftleggeo, new THREE.MeshFaceMaterial());
leftleg.position.z = -2;
leftleg.position.y = -6;
scene.add(leftleg);
@daniel-j
daniel-j / gist:3829127
Created October 3, 2012 19:14
Yatzy by djazz
#include <iostream>
#include <string>
#include <ctime>
#include <cstdlib>
#include <fstream>
using namespace std;
const int DICE_COUNT = 5;
const int ROUND_COUNT = 6;
@daniel-j
daniel-j / gist:3841983
Created October 5, 2012 19:53
Node.js LAN port scanner
var net = require('net');
var dns = require('dns');
var startAddress = "194.47.158.";
var scanAddress = "194.47.158.252";
var scanPort = 5357;
scanByPort(startAddress, scanPort, function (scanlist) {
console.log(startAddress+"*: [ "+scanlist.join(", ")+" ]");