Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
case "$1" in
on)
if [ "$(xrandr -q | grep "HDMI2 connected")" ] then
xrandr --output HDMI2 --left-of LVDS1 --auto
fi
;;
off)
xrandr --output HDMI2 --off
// Fridge Control
// Temperature based control of a Campingaz electric cooler/fridge type thing
// Uses an Atmel ATtiny chip as a controller
// Designed to keep the box within a certain temperature range.
// Written by nomadr4nger
#include <OneWire.h>
OneWire sensor(3); // Temp sensor is on pin 3
int fridge = 4; // Transistor is on pin 4
Dear Sir/Madam,
Following the recent string of attacks on high profile websites which
resulted in the public disclosure of their password hashes[1] I am
concerned by the lack of security employed by RBS in keeping passwords
safe. When logging in to your online banking service I am asked to
enter individual characters from my password. This goes against all
current best practices[2][3] as it requires the password to be stored in
plain text. It is appalling that this idiocy is still happening
(ns rsa.core
(:use [clojure.math.numeric-tower]))
(defn rand-bigint
"Returns a random integer with bitlength n"
[n] (bigint (new java.math.BigInteger n (new java.util.Random))))
(defn set-bit
"Set bits on a BigInteger"
([n b]
#!/usr/bin/perl
use strict;
use warnings;
my $PORT = "/dev/ttyUSB0";
my $DELAY = 30;
use DBI;
my $dbh = DBI->connect("dbi:SQLite:dbname=/srv/http/perl/data.db","","");
use Device::SerialPort qw( :PARAM :STAT 0.07 );