Skip to content

Instantly share code, notes, and snippets.

View pw.js
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://piwik.dack.com.au/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
@tdack
tdack / create_config.py
Last active Aug 29, 2015
DS18B20 1-wire data collection on Raspberry Pi
View create_config.py
#!/usr/bin/env python
import os, sys, glob, argparse
import ConfigParser
LOCATIONS = { 'rrd': ''
, 'graphs': ''
, 'sys_base': '/sys/bus/w1/devices/'
, 'config': ''
}
View collectord.py
#!/usr/bin/env python
from commands import getstatusoutput
from platform import node
from socket import socket, AF_INET, SOCK_STREAM
from sys import argv, exit
from time import sleep, time
from daemon import runner
import re
DELAY = 60
@tdack
tdack / wlan
Created Jul 3, 2014
/etc/initramfs-tools/hooks/wlan
View wlan
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
@tdack
tdack / iscsi
Created Jul 3, 2014
/usr/share/initramfs-tools/scripts/local-top/iscsi
View iscsi
PREREQ="wlan"
@tdack
tdack / initramfs.conf
Created Jul 3, 2014
/etc/initramfs-tools/initramfs.conf
View initramfs.conf
MODULES=dep
COMPRESS=gzip
DEVICE=wlan0
BOOT=local
@tdack
tdack / wlan
Created Jul 3, 2014
/etc/initramfs-tools/scripts/local-top/wlan
View wlan
#!/bin/sh
# Boot script to bring up wlan interface using wpa_supplicant before rest of boot process
PREREQ="udev"
prereqs()
{
echo "$PREREQ"
}
case $1 in
@tdack
tdack / iscsi.initramfs
Created Jul 3, 2014
/etc/iscsi/iscsi.initramfs
View iscsi.initramfs
# iscsi name for the RPi
ISCSI_INITIATOR=iqn.1993-08.lan.internal.rpi:01:6df87742251d
# iscsi target (eg: your NAS)
ISCSI_TARGET_NAME=iqn.2004-04.com.qnap:ts-419pii:iscsi.rpi.d55618
ISCSI_TARGET_IP=192.168.1.100
View ws_events_dispatcher.js
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tdack
tdack / smb.conf
Created Aug 6, 2014
BeagleBone Black smb.conf for Cloud 9 IDE to enable access from other systems. This is insecure as it allows a guest connecting to the samba share root access to the /var/lib/cloud9 directory - but you already get this through the Cloud9 browser IDE
View smb.conf
################################################################################
# samba.conf
# This configuration file allows you to customize the samba shares
# available from your machine
[global]
server string = BeagleBone Black Cloud 9 IDE
workgroup = WORKGROUP
netbios name = %h
You can’t perform that action at this time.