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
module UPC (is_upc) where | |
import Data.Char (digitToInt) | |
-- Is this string a valid Universal Product Code? | |
is_upc :: String -> Bool | |
is_upc u = ( length u == 12 ) && ( upc_checksum u `mod` 10 == 0 ) | |
-- Calculate the UPC checksum using the algorithm from http://xrl.us/omxh8 | |
upc_checksum :: String -> Int |
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
In http://blog.ndrix.com/2009/02/generalizing-twitter.html I wrote | |
some thoughts about a generalized event notification system. This | |
gist is just some random notes about things I might want to be | |
notified about. | |
* a new bid is placed on an eBay item | |
* a UPS/FedEx/USPS package is delivered | |
* a UPS/FedEx/USPS package changes location | |
* someone commits to an open source project I care about | |
* a server I monitor goes down |
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
Quality Matters: | |
"And whatsoever ye do, do it heartily, as to the Lord and not unto men" Colossians 3:23 | |
Treo 680 (and Agendus) has some features the iPhone doesn't have, but I had to restart the Treo about once each week. My overall productivity feels higher on the iPhone and my satisfaction is higher even though some tasks require more effort | |
http://tech.lds.org/index.php?option=com_content&view=article&id=236:what-does-quality-feel-like-online&catid=1:miscellanous |
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
Speed Matters: | |
Linus' talk on Git - http://www.youtube.com/watch?v=4XpnKHJAok8 | |
Google Chrome is now faster - http://chrome.blogspot.com/2009/05/speedier-google-chrome-for-all-users.html | |
Guidelines for user interface response time - http://www.useit.com/papers/responsetime.html | |
Nearly any YouTube talk from Steve Souders | |
http://googleresearch.blogspot.com/2009/06/speed-matters.html |
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; | |
use Graph; | |
use List::MoreUtils qw( any ); | |
my $g = Graph->new; | |
open my $git, '-|', q{git log --all --format='%H;%P'} or die; | |
print "Building commit graph ...\n"; | |
while ( my $line = <$git> ) { |
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
testing |
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
% Variable naming convention: | |
% T - town in which to snowbird | |
% Cs - choices made | |
% E - expense incurred | |
% | |
% t(T,Cs,E) represents a specific snowbirding trip. Standing at home | |
% and having decided to snowbird in Las Vegas is represented as | |
% t(vegas, Cs, 0). That is, I've decided on Vegas and incurred no cost yet, | |
% but haven't made any choices about how I'll get there. |
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
diff --git a/src/jsprf.c b/src/jsprf.c | |
index 416c16c..6735520 100644 | |
--- a/src/jsprf.c | |
+++ b/src/jsprf.c | |
@@ -58,6 +58,8 @@ | |
*/ | |
#ifdef HAVE_VA_COPY | |
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar) | |
+#elif defined(va_copy) | |
+#define VARARGS_ASSIGN(foo, bar) va_copy(foo,bar) |
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
diff --git a/GPG/plugin.py b/GPG/plugin.py | |
index 171d876..cfd4482 100644 | |
--- a/GPG/plugin.py | |
+++ b/GPG/plugin.py | |
@@ -333,19 +333,27 @@ class GPG(callbacks.Plugin): | |
irc.reply(response + "not identified.") | |
ident = wrap(ident, [optional('something')]) | |
- def info(self, irc, msg, args, nick): | |
- """<nick> |
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; | |
use File::Temp qw( tempfile ); | |
use autodie qw( system ); | |
my ( undef, $filename ) = tempfile( 'otc-XXXX', TMPDIR => 1 ); | |
system "pbpaste | gpg --clearsign > $filename"; | |
system "scp $filename example.com:/var/www/otc-auth.asc"; | |
system "echo -n ';;gpg verify http://www.example.com/otc-auth.asc' | pbcopy"; |
OlderNewer