This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sleep 1 | |
DOCKED=$(cat /sys/devices/platform/dock.0/docked) | |
case "$DOCKED" in | |
"0") | |
XAUTHORITY=/home/duncan/.Xauthority /usr/bin/xrandr -d :0 --output DVI-D-0 --off | |
;; | |
"1") | |
#do nothing | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Case #1: 1657 | |
Case #2: 5495 | |
Case #3: 2254 | |
Case #4: 5982 | |
Case #5: 3958 | |
Case #6: 3897 | |
Case #7: 4877 | |
Case #8: 348 | |
Case #9: 2962 | |
Case #10: 2138 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Maths Assignment | |
V1 in 0 ac 240V sin(0 1 50Hz) | |
R1 in 1 12 | |
L1 1 2 0.1 | |
C1 2 0 160u | |
.control | |
ac lin 1 50 50 | |
print ph(-I(V1)) mag(I(v1)) | |
.endc | |
.END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Maths Assignment | |
V1 in 0 ac 240V sin(0 1 50Hz) | |
R1 in 1 12 | |
L1 1 2 0.1 | |
C1 2 0 160u | |
.control | |
ac lin 1 50 50 | |
print ph(-I(V1)) mag(I(v1)) | |
.endc | |
.END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "evdev keyboard catchall" | |
MatchIsKeyboard "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "evdev" | |
Option "XbkModel" "thinkpad60" | |
Option "XkbLayout" "gb" | |
Option "XkbOptions" "ctrl:nocaps" | |
EndSection |
OlderNewer