Skip to content

Instantly share code, notes, and snippets.

@maleadt
maleadt / MobileVikingsN900.py
Created February 26, 2011 20:07
Mobile Vikings widget for Maemo, with a bit more native lookings.
# (c) 2011 Bart Coppens
# Licensed under GPLv3+
import gtk
import cairo
import hildon
import hildondesktop
import pycurl
import StringIO
import math
@maleadt
maleadt / gist:1140303
Created August 11, 2011 18:01
Webcam-based power monitor
#!/usr/bin/python2
#
# Configuration
#
# System modules
import sys
import argparse # python-argparse
import logging
@maleadt
maleadt / DS18S20_monitor.pseudo.c
Created September 18, 2011 09:38
Arduino sketch to monitor the temperature using a DS18S20 and save the values in the EEPROM.
////////////////////////////////////////////////////////////////////////
// Configuration
//
// Headers
#include <OneWire.h>
#include <EEPROM.h>
// OneWire interface (change this to the port your sensor is on)
OneWire ow(2);
@maleadt
maleadt / http_sniffer.pl
Created September 18, 2011 09:40
Simple HTTP file sniffer.
#!/usr/bin/perl
#
# Configuration
#
# Write nicely
use warnings;
use strict;
@maleadt
maleadt / gist:2367858
Created April 12, 2012 14:49
ledcontrol
#!/usr/bin/perl
#
# Initialization
#
use strict;
use warnings;
use Switch;
@maleadt
maleadt / PKGBUILD
Created June 5, 2012 15:00
Updated PKGBUILD for intel-mkl
# Maintainer: monson <[email protected]>
# Contributor: giniu <[email protected]>
# Contributor: Tim Besard <[email protected]>
pkgname=intel-mkl
pkgver=10.3.10
pkgrel=1
pkgdesc="Intel Math Kernel Library, for non-commercial use."
arch=('i686' 'x86_64')
url="http://software.intel.com/en-us/intel-mkl/"
@maleadt
maleadt / PKGBUILD
Created June 3, 2013 08:24
PKGBUILD for TurboVNC client and server packages.
pkgname=('turbovnc-client' 'turbovnc-server')
srcname='turbovnc'
pkgver=1.2
pkgrel=1
arch=('i686' 'x86_64')
url="http://virtualgl.org"
license=('GPL')
builddepends=('libjpeg-turbo')
md5sums=('b8900785792f8b0d025c1f8b52fff14b')
void DRESC_test09(short int *data1, int *time_offset) {
int j;
int A0, A1, A2, B0;
for (j = 0; j < (57); j++) {
A2 = data1[j];
A0 = A1;
A1 = A2;
#ping = 172.31.14.1
#ping = 172.26.1.255
#interface = eth0
#file = /var/log/messages
#change = 1407
# Uncomment to enable test. Setting one of these values to '0' disables it.
# These values will hopefully never reboot your machine during normal use
# (if your machine is really hung, the loadavg will go much higher than 25)
#max-load-1 = 24
using Images
data = rand(10, 10)
image = Image(data)
immutable Point{T}
i::T
j::T
end