Skip to content

Instantly share code, notes, and snippets.

🙌

@avuserow
avuserow / keybase.md
Created May 27, 2015 18:37
keybase.md

Keybase proof

I hereby claim:

  • I am avuserow on github.
  • I am avuserow (https://keybase.io/avuserow) on keybase.
  • I have a public key whose fingerprint is 40B8 FB7B E34F 290D D724 2959 6E17 AEB6 3F2D C7A8

To claim this, I am signing this object:

@avuserow
avuserow / hiveminder-archive.pl
Created February 18, 2015 06:04
hiveminder export script
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use Net::Hiveminder;
$Data::Dumper::Sortkeys = 1;
@avuserow
avuserow / gearman.p6
Created February 10, 2015 06:08
Sample enum conversion
enum GearmanReturn (
'GEARMAN_SUCCESS',
'GEARMAN_IO_WAIT',
'GEARMAN_SHUTDOWN',
'GEARMAN_SHUTDOWN_GRACEFUL',
'GEARMAN_ERRNO',
'GEARMAN_EVENT', # DEPRECATED', SERVER ONLY
'GEARMAN_TOO_MANY_ARGS',
'GEARMAN_NO_ACTIVE_FDS', # No servers available
'GEARMAN_INVALID_MAGIC',
@avuserow
avuserow / gist:d1b207adf78934b136b3
Created September 21, 2014 04:30
urlteam traceback
INFO:DefaultService:Requesting http://kcy.me/1dwta
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): kcy.me
Traceback (most recent call last):
File "scraper.py", line 60, in <module>
main()
File "scraper.py", line 37, in main
result = scraper_client.run()
File "/home/ak/terroroftinytown-client-grab/terroroftinytown/terroroftinytown/client/scraper.py", line 50, in run
result = self.service.scrape_one(item)
File "/home/ak/terroroftinytown-client-grab/terroroftinytown/terroroftinytown/services/base.py", line 43, in scrape_one
@avuserow
avuserow / parrot-traceback.log
Last active August 29, 2015 14:04
intermittent parrot 6.6.0 traceback on jsonrpc/t/server.t and doc/t/typegraph.t
# jsonrpc/t/server.t
GNU gdb (GDB) Fedora 7.6.1-46.fc19
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
@avuserow
avuserow / gist:43c1605cb79793b9167a
Created July 23, 2014 18:08
module-test output from MoarVM pre-star 2014.07
# built from https://github.com/avuserow/star/commit/05d4a2b787fc8b7be74a8670a5f31ada921f5d6f
make modules-test
/usr/bin/perl tools/build/modules-test.pl /home/ak/projects/perl6/star/work-moar/rakudo-star-2014.07 /home/ak/projects/perl6/star/work-moar/rakudo-star-2014.07/install/bin/perl6-m modules/MODULES.txt
Testing modules/zavolaj with /home/ak/projects/perl6/star/work-moar/rakudo-star-2014.07/install/bin/perl6-m...
t/01-argless.t ......... ok
t/02-simple-args.t ..... ok
t/03-simple-returns.t .. ok
t/04-pointers.t ........ ok
t/05-arrays.t .......... ok
@avuserow
avuserow / output
Created May 15, 2014 18:10
MySQL oddities
1: got user $VAR1 = {
'uid' => '1'
};
with undef uid!
2: ok (didn't find a user)
@avuserow
avuserow / Makefile
Created March 1, 2011 05:19
broken and partial implementation of replaygain in C using ffmpeg
all : amp-rg
debug : amp-rg-debug
CFLAGS = -Wall -std=gnu99 -pedantic -g -I/usr/include/ffmpeg
LINK = -lavutil -lavformat -lavcodec -lz -lavutil -lm
EXE = amp-rg
amp-rg : main.o gain_analysis.o
gcc $(CFLAGS) -o $(EXE) main.o gain_analysis.o $(LINK)
@avuserow
avuserow / acpi-vol.sh
Created February 23, 2011 16:21
script to change volume on thinkpads, and also synchronize the hardware mute with the software mute. First argument is up to raise by 10%, down to lower by 10%, or no argument to just automatically mute/unmute.
#!/bin/sh
MUTED=`perl -lne'print (/mute:\s+(\w+)/) if /mute:/' < /proc/acpi/ibm/volume`
# default to muted if the state is unknown
if [ "${MUTED}" == "off" ] ; then
amixer set Master on -q
else
amixer set Master off -q
fi