Skip to content

Instantly share code, notes, and snippets.

View theory's full-sized avatar
💭
🥃

David E. Wheeler theory

💭
🥃
View GitHub Profile
> perlbrew use perl-5.20.2
> LANG=de_DE.UTF-8 perl -MPOSIX=setlocale -Mlocale -E 'setlocale POSIX::LC_ALL, ""; do { no locale; printf "%.1f\n", 1.1223 }'
1.1
> perlbrew use perl-5.18.4
> LANG=de_DE.UTF-8 perl -MPOSIX=setlocale -Mlocale -E 'setlocale POSIX::LC_ALL, ""; do { no locale; printf "%.1f\n", 1.1223 }'
1,1
[Error] TypeError: undefined is not a constructor (evaluating 'new (window.AudioContext)()')
(anonymous function) (bundle.js, line 251)
s (bundle.js, line 1)
e (bundle.js, line 1)
global code (bundle.js, line 1)
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.11\" -DXS_VERSION=\"0.11\" -fPIC "-I/usr/local/perl522/lib/x86_64-linux-thread-multi/CORE" byterun.c
In file included from /usr/local/perl522/lib/x86_64-linux-thread-multi/CORE/perl.h:3733:0,
from byterun.c:17:
byterun.c: In function ‘byterun’:
/usr/local/perl522/lib/x86_64-linux-thread-multi/CORE/pad.h:305:39: error: ‘PAD’ has no member named ‘xpadnl_max_named’
#define PadnamelistMAXNAMED(pnl) (pnl)->xpadnl_max_named
^
bytecode.h:791:5: note: in expansion of macro ‘PadnamelistMAXNAMED’
PadnamelistMAXNAMED((PAD*)pad) = AvFILL((AV*)pad)
^
@theory
theory / amazon-mfa.txt
Created April 4, 2015 17:16
Request for MFA sent to Amazon
I do a fair amount of shopping on Amazon, and often have several credit card
numbers associated with my account. It is an increasingly important part of
my online presence.
That's why it distresses me that I am not able to enable multi-factor
authentication (a.k.a. 2-factor authentication) to further project the
integrity of my account. This is a feature request: Please add support for
multi-factor authentication. Amazon already provides multi-factor
authentication for AWS; it should be provided for Amazon.com accounts, too.
@theory
theory / sloccount-sqitch.txt
Last active August 29, 2015 14:18
sloccount Sqitch
Total Physical Source Lines of Code (SLOC) = 30,034
Development Effort Estimate, Person-Years (Person-Months) = 7.12 (85.45)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 1.13 (13.55)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 6.31
Total Estimated Cost to Develop = $ 961,912
(average salary = $56,286/year, overhead = 2.40).

Keybase proof

I hereby claim:

  • I am theory on github.
  • I am theory (https://keybase.io/theory) on keybase.
  • I have a public key whose fingerprint is A0CA 1F63 2E9B 4A6E 5FA6 42FB 5B29 ADEC 0EC6 5DF3

To claim this, I am signing this object:

# Bricolage
alias btest="perl Makefile.PL; sudo make devtest TEST_VERBOSE=1 > $HOME/Desktop/bric_test.out 2>&1; tail -50 $HOME/Desktop/bric_test.out"
alias killa="sudo perl /usr/local/bricolage/bin/bric_apachectl stop"
alias kicka="sudo perl /usr/local/bricolage/bin/bric_apachectl restart"
alias starta="sudo perl /usr/local/bricolage/bin/bric_apachectl start"
alias build="/usr/local/bricolage/bin/bric_pgimport -u postgres -p postgres -d sharky -r -g castellan"
alias pbuilds="bbuild BRICOLAGE_HTTPD_VERSION=apache2 BRICOLAGE_DB_TYPE=Pg BRICOLAGE_SSL=1"
alias pbuilds1="bbuild BRICOLAGE_HTTPD_VERSION=apache BRICOLAGE_DB_TYPE=Pg BRICOLAGE_SSL=1"
alias mbuilds="bbuild BRICOLAGE_HTTPD_VERSION=apache2 BRICOLAGE_DB_TYPE=mysql BRICOLAGE_SSL=1"
alias mbuilds1="bbuild BRICOLAGE_HTTPD_VERSION=apache BRICOLAGE_DB_TYPE=mysql BRICOLAGE_SSL=1"
2001 ( 2) #
2002 ( 47) ###########################
2003 ( 45) ##########################
2004 ( 67) #######################################
2005 ( 44) #########################
2006 ( 43) #########################
2007 ( 7) ####
2008 ( 65) ######################################
2009 ( 26) ###############
2010 ( 33) ###################
use v5.12;
use warnings;
use utf8;
my $uname = 'theory';
my ($curr_month, $curr_year) = (gmtime)[4,5];
$curr_year += 1900;
$curr_month += 1;
my %projects;
for my $year (2012..$curr_year) {
# If two params, first is URI, second is target.
# If two params and either --to-target or --database is passed, it's an error.
# If one param:
# - If --to-target is passed, it's a database
# - If --database is passed, it's a target
# - If both --to-target and --database are passed, it's an error.
# - If contains ":", it's a URI; pass it through
# - If it is a database key name, return the URI value
# - If it's part of the plan, pass it as part of the plan.
# - Otherwise throw an exception.