Skip to content

Instantly share code, notes, and snippets.

View frioux's full-sized avatar
⚔️

fREW Schmidt frioux

⚔️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am frioux on github.
  • I am frew (https://keybase.io/frew) on keybase.
  • I have a public key whose fingerprint is 2896 7E7B F03D B43E 5A43 3430 6EB3 302F 737A 7582

To claim this, I am signing this object:

@frioux
frioux / gist:16eb1e3fab1c887db7b5
Created October 31, 2014 12:30
Black Lightning (Prodigy Disc 1)
  • Transportation Options - Buckethead
  • Sow Thistle - Buckethead
  • The Shape vs Buckethead - Buckethead
  • Frozen Brains Tell No Tails - Buckethead
  • The Holy Filament - Mr. Bungle
  • Only The Good Die Young - Iron Maiden
  • Dressed In Decay - CKY
  • As The Tables Turn - CKY
  • Red Water - Type O Negative
  • Thunder Kiss '65 - White Zombie
@frioux
frioux / hot-toddy.mkdn
Last active August 29, 2015 14:13 — forked from rjbs/hot-toddy.mkdn

Ultimate hot buttered rum recipe

Brian Reid, 1985-07-21

I started making hot buttered rum from a Trader Vic recipe 15 years ago, and I have gradually evolved it by adding more spices, more butter, and less rum.

The way you make a hot buttered rum is to add some “batter” to some rum, and heat it. I like to keep a made-up batch of the batter in the refrigerator in an old margarine tub. For parties I make up a fresh batch.

@frioux
frioux / gist:8f84b5277306a00ed37b
Created May 25, 2015 01:46
Export passwords from Firefox into Keepass
#!/usr/bin/env perl
use 5.20.0;
use warnings;
use autodie;
use experimental 'postderef';
use File::KeePass;
use Text::CSV;
module Ghetto;
sub run($cmd) {
# create a random filename to store output in
my $tmp = ".tmp-{(1..100).pick}-ghetto";
# use the real run command, :: means root namespace
::run("$cmd > '$tmp'");
# open the file
#!/home/frew/personal/rakudo/perl6
use Ghetto;
for =$*IN -> $track,$artist,$album,$sep {
my $cmd = qq{dcop amarok collection query "SELECT url FROM tags JOIN artist ON artist.id = artist JOIN album ON album.id = album WHERE artist.name = \\"$artist\\" and album.name = \\"$album\\" and title = \\"$track\\""};
# this insanity is to take the first character off because amaroK adds a
# . to the front of all the file names. There's probably a better way
# to do this.
say Ghetto::run($cmd).split("\n")[0].reverse.chop.reverse;
#!/home/frew/personal/rakudo/perl6
use Ghetto;
for =$*IN -> $line {
unless $line ~~ /^\#/ {
my $file = $line.split('/').pop;
my $cmd = qq{dcop amarok collection query "SELECT title,artist.name,album.name FROM tags JOIN artist ON artist.id = artist JOIN album ON album.id = album WHERE url LIKE \\"%/$file\\""};
my ( $track,$artist,$album ) = Ghetto::run($cmd).split("\n");
@frioux
frioux / gist:1172717
Created August 26, 2011 04:46
Why even being in #p5p is not worth my time
< frew> does anyone think that it would be worthwhile to implement a pure perl implementation of the various POSIX functions that are fallbacks?
< frew> it seems like it would mostly be SMOP and it would really help at least me :-)
< frew> (win32 boo)
<@LeoNerd> Which functions did you have in mind?
< frew> well I just ran into WEXITSTATUS
<@Steve_p> That was done, wasn't it?
< frew> and I had an issue with the date formatting a while ago
<@LeoNerd> strftime?
<+purl> hmmm... strftime is in POSIX.pm or possibly *very* useful for formatting dates or %Y%m%d is what you want
< frew> yessir
@frioux
frioux / gist:3220451
Created July 31, 2012 20:55
<3 correlated subqueries
SELECT [me].[id], [me].[name], [me].[group_id], [me].[user], [me].[version], [me].[is_active], [key_server_side_mia], [button_server_side_mia], [messenger_server_side_
mia], [key_pro_server_side_mia], [key_status], [button_status], [messenger_status], [key_pro_status], [is_group_active], [last_checkin], [macro]
FROM (
SELECT [me].[id], [me].[name], [me].[group_id], [me].[user], [me].[version], [me].[is_active], [key_server_side_mia], [button_server_side_mia], [messenger_server_s
ide_mia], [key_pro_server_side_mia], [key_status], [button_status], [messenger_status], [key_pro_status], [is_group_active], [last_checkin], [macro], ROW_NUMBER() OVE
R (
ORDER BY
SELECT( 1 )
) AS [rno__row__index]
FROM (
@frioux
frioux / gist:4288396
Created December 14, 2012 20:27
weird bug in union I think
.:15:24:31:. <geoff> which, I had an interesting time meshing that union with correlated_resultset,
incidentally
.:15:24:41:. frew I made a thing that will correctly sort on a correlated column when the user asks to
.:15:24:51:. frew oh?
.:15:24:52:. frew why?
.:15:24:53:. <geoff> oooo
.:15:24:58:. <geoff> I just had to do
.:15:25:05:. <geoff> $rs1->with_correlation
.:15:25:10:. <geoff> and $rs2->with_correlation
.:15:25:13:. <geoff> then union