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 | |
_screen=1 | |
xrandr | sed -ne 's/(.*$//' -e 's/.* connected *//p'| | |
while read _line; do | |
_size=${_line#* } | |
echo SCREEN_${_screen}_HEIGHT=`echo $_size | sed -e 's/.*x//' -e 's/\+.*//'` | |
echo SCREEN_${_screen}_WIDTH=`echo $_size | sed -e 's/x.*//'` | |
echo SCREEN_${_screen}_X=`echo $_size | sed -e 's/[^+]*+\([0-9]*\).*/\1/'` | |
echo SCREEN_${_screen}_Y=`echo $_size | sed -e '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
#!/usr/bin/perl | |
# $Id: cleanup_maildirs,v 1.27 2011/02/22 00:36:24 andrew Exp $ | |
# Copyright (c) 2013 Andrew Fresh <andrew@afresh1.com> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
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 uses qemu, so pkg_add qemu | |
# Download and extract flashrd, either from github or here: | |
# http://www.nmedia.net/flashrd/ | |
# Grab a flashrd image from here: | |
# http://www.nmedia.net/flashrd/images/ | |
# and set the name: | |
flashimg=flashimg.amd64.pccons-20130318 |
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
#!/usr/bin/perl | |
######################################################################## | |
# Copyright (c) 2013 Andrew Fresh <andrew@afresh1.com> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
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
http://soekris.com/products/net4511.html | |
jp3 on the Soekris net4511 | |
pin -> gpio | |
3 -> 5 | |
4 -> 6 | |
5 -> 7 | |
6 -> 8 | |
7 -> 21 | |
8 -> 22 |
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
function calagatorFactory() { | |
var calagator = CalendarApp.getCalendarsByName('calagator')[0]; | |
var start = new Date(); | |
var end = new Date( start.getTime() + 7 * 24 * 60 * 60 * 1000 ); | |
var findCopiedEvent = function(cal, event) { | |
var copy; | |
var events = cal.getEventsForDay( event.getStartTime() ); | |
for (i in events) { |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# Copyright (c) 2013 Andrew Fresh <andrew@afresh1.com> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
$| = 1; | |
print "foo: bar\r\n" for 1 .. 15; | |
print "\r\n"; | |
print "quux\r\n"; |
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 | |
ulimit -n $(ulimit -Hn) | |
ulimit -d $(ulimit -Hd) | |
exec /usr/local/bin/firefox "$@" |
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 | |
if ! pgrep xlock >/dev/null 2>&1; then | |
xlock -lockdelay 0 & | |
sleep 1 | |
fi | |
sudo -k | |
ssh-add -D |