Skip to content

Instantly share code, notes, and snippets.

View dpavlin's full-sized avatar

Dobrica Pavlinušić dpavlin

View GitHub Profile
import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
@dpavlin
dpavlin / audacity-labels.pl
Created August 12, 2010 18:31
Dump labels from Audacity into <li> with formatting
#!/usr/bin/perl
# usage:
# ./audacity-labels.pl 6-nosql-take-3.aup
use warnings;
use strict;
use XML::Simple;
use Data::Dump qw(dump);
@Meettya
Meettya / Author.pm
Created February 25, 2011 21:03
MojoX::Redis example
package NoticeBackend::Author;
use Mojo::Base 'Mojolicious::Controller';
use 5.12.0;
use warnings;
use utf8;
use MojoX::Redis;
my $redis = MojoX::Redis->new(server => '192.168.1.20:6379');
@guybrush
guybrush / nodeconf_2011.md
Created May 6, 2011 07:22
a list of slides from nodeconf 2011
@gdamjan
gdamjan / 3g
Created December 2, 2011 21:37
connect to 3G from command line (with pppd and chat)
# file: /etc/ppp/peers/3g
# usage: pppd call 3g
connect '/etc/ppp/peers/dial -V -Upublicinternet -T*99***1#'
user internet
password internet
noauth
usepeerdns
@jyio
jyio / Makefile
Created December 19, 2011 23:01
build the CyanogenMod 9 preview for NOOK Color
## Copyright (c) 2011 Jiang Yio, http://inportb.com/
##
## Permission is hereby granted, free of charge, to any person obtaining
## a copy of this software and associated documentation files (the
## "Software"), to deal in the Software without restriction, including
## without limitation the rights to use, copy, modify, merge, publish,
## distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to
## the following conditions:
##
@revmischa
revmischa / wr703n-blink.c
Created January 7, 2012 22:53
TP-LINK WR703n LED Blinker
@chaosct
chaosct / soziframes.js
Created February 22, 2012 00:35
sozi frame generator using phantomjs
/*
soziframes.js : transforming sozi SVG animations
to a sequence of PNG images, so you can make
a proper video without capturing the screen.
author: Carles F. Julià < chaos.ct _AT_ gmail com >
You need phantomjs to run it!
*/
var page = require('webpage').create(),
@und3f
und3f / no-more-blues.pl
Created May 2, 2012 20:40
No more blues with internal speaker
use Audio::Beep; Audio::Beep->new->play(join ' ', <DATA>);
__DATA__
\bpm240
f2 a, d2. f4 e2 b2 d2.
e4 f2 bes cis2.
f4 e d8 f4 f6 e d a1
f'2 a,2 b d c4 e2
r4 e d c c4 bes2
r4 f e d d cis e c bes2. r4