Skip to content

Instantly share code, notes, and snippets.

@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 / .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 / 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 / moonradio.m3u
Last active October 23, 2023 19:24
Parasprite Radio Playlists
music/Sailor Moon/English/Full Moon Collection/01 - Pan Flute.flac
music/Sailor Moon/English/Full Moon Collection/02 - Sailor Moon Theme (S.A.F. Remix).flac
music/Sailor Moon/English/Full Moon Collection/07 - Moon Crystal Power.flac
music/Sailor Moon/English/Full Moon Collection/13 - Tuxedo Mask.flac
music/Sailor Moon/English/Full Moon Collection/16 - Nothing At All.flac
music/Sailor Moon/English/Full Moon Collection/18 - It's A New Day.flac
music/Sailor Moon/English/Full Moon Collection/20 - Sailor Moon Theme (S.A.F. Club Mix).flac
music/Sailor Moon/English/Full Moon Collection/21 - Queen Beryl.flac
music/Sailor Moon/English/Songs From the TV Series/01 - Sailor Moon Theme Song.flac
music/Sailor Moon/English/Songs From the TV Series/02 - I Want to be a Star.flac
@daniel-j
daniel-j / interface.js
Last active January 2, 2018 19:04
Parasprite Radio files and utilities (for LiquidSoap and MPD)
#!/usr/bin/env node
var net = require('net');
var client = net.connect(1234, "localhost");
client.pipe(process.stdout);
client.on('connect', function () {
console.log("Connected!");
...
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 / piglow-monitor.c
Last active January 4, 2016 02:59
A system monitor for PiGlow, uses the PyGlow library, shows CPU usage, memory usage and current CPU temperature. When a value change it transition to it smoothly. There's also a version written in C using the wiringPi library! It should use less CPU, and it's multithreaded, yay!
//
// PiGlow system monitor by djazz!
// Makefile is embedded below
//
// Configuration
float temperature_range[] = {35.0, 65.0};
float led_update_interval = 1000/20.0;
float value_update_interval = 1000.0;
@daniel-j
daniel-j / livestream-pi.sh
Last active September 5, 2017 16:08
Livestream raspicam to RTMP server with audio (optional, uses an ALSA capture device).
#!/bin/bash
# created by djazz (@daniel_hede)
# Video
width=640
height=360
fps=25
vkbits=128
# Audio
@daniel-j
daniel-j / ircbot-template.js
Last active December 30, 2015 20:49
My IRC bot template..
#!/usr/bin/env node
'use strict';
// IRC bot by djazz
// Modules
//var http = require('http');
var irc = require('irc');
var colors = require('colors');
var util = require('util');
var readline = require('readline');
@daniel-j
daniel-j / mopidy-spotify-playlist-local-files-merger.js
Last active December 30, 2015 18:08
This script takes a Spotify playlist URI and creates a Mopidy playlist with local file support! It uses mpc to search your media library using the spotify local tags, and replaces them with the real filename on your drive. It then saves the playlist in your local playlist folder. Make sure you modify this script before running it!
#!/usr/bin/env node
'use strict';
// Created by djazz
// Use with Mopidy to use Spotify playlist with local files in them
// Dependencies:
// $ npm install spotify-web ini
//
// mopidy (or mpd) must be running, mpc must be installed