Skip to content

Instantly share code, notes, and snippets.

View juzam's full-sized avatar

Giovanni Angoli juzam

  • Italia
View GitHub Profile
@juzam
juzam / inkpen.md
Created March 6, 2014 11:36
Created using Inkpen - http://inkpen.in

tstamp = Math.floor(Date.parse(iso-8601-tstamp)/1000);

#!/bin/bash
#
# This starts and stops shairport
#
### BEGIN INIT INFO
# Provides: sonos-airplay
# Required-Start: $network
# Required-Stop:
# Short-Description: Sonos Airplay Bridge
# Description: Sonos Airplay Bridge
#! /bin/sh
# Starts and stops node-red
# /etc/init.d/node_red
### BEGIN INIT INFO
# Provides: node_red
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Node Red
@juzam
juzam / PageLinks
Created February 5, 2014 09:33
Get all links in a page Bookmarklet, adapted from: http://forums.mozillazine.org/viewtopic.php?p=2190545#p2190545
#!/usr/bin/env python
from datetime import timedelta, tzinfo
from dateutil import tz
from shlex import split
from subprocess import Popen, PIPE
import os
import plistlib
NOT_ENABLED = u'Not enabled.'
@juzam
juzam / huff.sh
Last active August 27, 2018 00:23
huffduffer automator
#!/bin/bash
URL=$1
WORKDIR=/tmp
# puff.py helper location
PUFF=/usr/local/bin/puff.py
ID=`youtube-dl --get-id $URL`
@juzam
juzam / blink1_infocon
Last active December 10, 2015 19:39
Super simple ISC Infocon to blink(1) script
#!/bin/bash
# reduntant check since in cygwin both options works the same way
if [ $OS = "cygwin" ]; then
BLINK1TOOL=/usr/local/bin/blink1-tool.exe
else
BLINK1TOOL=/usr/local/bin/blink1-tool
fi
# colour mapping