Skip to content

Instantly share code, notes, and snippets.

View dpavlin's full-sized avatar

Dobrica Pavlinušić dpavlin

View GitHub Profile
@afresh1
afresh1 / tcpbench_client.pl
Created December 14, 2012 04:23
This is a [Mojolicious](http://mojolicio.us) streaming http server that opens a [tcpbench](http://www.openbsd.org/cgi-bin/man.cgi?query=tcpbench) connection to back to you. For me this lets me put the page on my server on the net and connect back to my home system and see the results on anything with a web browser. Mostly based on the [EventSour…
#!/usr/bin/perl
# Start this on a server someplace with tcpbench
# Start tcpbench -s on a machine that is the remote IP you are connecting the the web from
# Browse to the page.
use Mojolicious::Lite;
use Mojo::IOLoop;
use Mojo::IOLoop::Stream;
# Template with browser-side code
get '/' => sub {
@chrox
chrox / github-upload.py
Created November 2, 2012 15:34
build and upload customupdate of kindlepdfviewer automatically
#!/usr/bin/python
import os
import sys
import time
from datetime import datetime,timedelta
import subprocess
from github import Github
PROXY = "http://192.168.1.101:7071"
USER_TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@ajstarks
ajstarks / hellovg.go
Created September 3, 2012 02:42
OpenVG + Go
//
// first OpenVG program
// Anthony Starks (ajstarks@gmail.com)
//
//
package main
import (
"fmt"
"github.com/ajstarks/openvg"
@jbarrett
jbarrett / rssfs.pl
Created August 24, 2012 14:05
FUSE Module to read/mount a RSS feed
#!/usr/bin/env perl
# rssfs.pl
use strict;
use warnings;
use Date::Parse;
use Fuse;
use HTML::FormatText::WithLinks;
@dpavlin
dpavlin / mysqldump-4-to-5-migration.pl
Created July 10, 2012 19:31
Migrate MySQL 4.0 dump to 5.5 format
#!/usr/bin/perl
use warnings;
use strict;
my $create_table = 0;
sub key {
my ($unique,$key,$name,$cols) = @_;
$name = "`$name`" if defined $name;
return " $unique$key $name (" . join(',', map {
@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
@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(),
@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:
##
@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
@guybrush
guybrush / nodeconf_2011.md
Created May 6, 2011 07:22
a list of slides from nodeconf 2011