This file contains 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 | |
# This may be OS X Specific. GNU Coreutils 8.21 sleep(1) | |
# reports it supporting fractional seconds. | |
# Your mileage may vary. | |
# Refer to http://world.std.com/~reinhold/diceware.html | |
rand () | |
{ | |
ruby -e 'puts rand.to_s' |
This file contains 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
## The Rakefile | |
require 'RRDtool' | |
require 'daemon_temperature' | |
task :default => :test_update_temps | |
desc "Test Update All Disk Temperatures" | |
task(:test_update_temps) do | |
now = Time.now | |
rrds = Hash.new(nil) | |
terms = [ 'hour', 'day', 'week', 'month', 'year' ] | |
RRD_ROOT = File.join(File.dirname(__FILE__),'rrds') |
This file contains 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
require 'socket' | |
class DaemonTemperature | |
include Socket::Constants | |
def initialize(hostname,port = 7634) | |
socket = Socket.new AF_INET,SOCK_STREAM,0 | |
sockaddr = Socket.pack_sockaddr_in(port,hostname) | |
sock_results = "" | |
begin | |
socket.connect(sockaddr) | |
sock_results = socket.read |
This file contains 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
# For http://rubylearning.com/blog/2009/10/08/rpcfn-average-arrival-time-for-a-flight-2/ | |
# I take the lazy approach and assume 12:01am is today, not tomorrow. | |
def average_time_of_day(ary) | |
sec = ary.map do |t| | |
hour, min_with_noonside = t.split(":") | |
(hour.to_i * (min_with_noonside.include?("pm") ? 2 : 1) * 3600) + (min_with_noonside.to_i * 60) | |
end.inject(0) { |s,c| s += c } / ary.size | |
hour = sec / 3600 | |
min = ((sec - hour * 3600) / 60).to_s |
This file contains 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
#define SENSORPIN 0 | |
#define PWMPIN 3 | |
int sensorMax = -1; | |
int sensorMin = 1024; | |
void setup() { } | |
void loop() { | |
delay(10); |
This file contains 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
<?xml version="1.0" ?> | |
<fittings> | |
<fitting name="Raquel Smith's Ishtar"> | |
<description value=""/> | |
<shipType value="Ishtar"/> | |
<hardware slot="low slot 0" type="800mm Reinforced Steel Plates II"/> | |
<hardware slot="low slot 2" type="Armor Thermic Hardener II"/> | |
<hardware slot="rig slot 1" type="Large Auxiliary Nano Pump I"/> | |
<hardware slot="rig slot 0" type="Large Capacitor Control Circuit I"/> | |
<hardware slot="hi slot 0" type="Small Tractor Beam I"/> |
This file contains 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
MATCH EXTENSIONS | |
iptables can use extended packet matching modules. These are loaded in | |
two ways: implicitly, when -p or --protocol is specified, or with the | |
-m or --match options, followed by the matching module name; after | |
these, various extra command line options become available, depending | |
on the specific module. You can specify multiple extended match mod- | |
ules in one line, and you can use the -h or --help options after the | |
module has been specified to receive help specific to that module. | |
The following are included in the base package, and most of these can |
This file contains 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
#include <Ethernet.h> | |
#include <ASocket.h> | |
#include <EEPROM.h> | |
#include "Dhcp.h" | |
#ifdef HOST_NAME | |
#undef HOST_NAME | |
#endif | |
#define HOST_NAME "myarduino" | |
#define DEBUG |
This file contains 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 | |
# Usage: membercheck_sh <email1> [email2] [email3] [emailn..] | |
for listname in `/usr/lib/mailman/bin/list_lists | grep -v "matching mailing" | awk -F ' - ' '{print $1}'| tr -s " "` | |
do | |
members="$(/usr/lib/mailman/bin/list_members $listname | tr '\n' ',')" | |
echo "${listname}:${members}" >> /tmp/list_members.txt | |
done | |
for address in $@ |
This file contains 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
lisas@alleycat ~ $ ping -c1 192.168.100.253 | |
PING 192.168.100.253 (192.168.100.253): 56 data bytes | |
64 bytes from 192.168.100.253: icmp_seq=0 ttl=128 time=-173040.567 ms | |
wrong data byte #8 should be 0x8 but was 0x9 | |
cp:4b b5 37 b0 a 5a eb 8 | |
9 a b c d e f 10 11 12 13 14 15 16 17 18 | |
19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 | |
29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 0 | |
dp:4b b5 37 b0 0 a 5a eb | |
8 9 a b c d e f 10 11 12 13 14 15 16 17 |
OlderNewer