Skip to content

Instantly share code, notes, and snippets.

View rafaelmartins's full-sized avatar
🎹

Rafael G. Martins rafaelmartins

🎹
View GitHub Profile
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# MusicLog Daemon
#
# Copyright (c) 2008 Rafael G. Martins <rafael@rafaelmartins.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@rafaelmartins
rafaelmartins / wtf
Created April 19, 2011 19:41
wtf-server.co.cc client
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
wtf
---
This is the wtf-server.co.cc client. It is based on the old `wtf` game, from
NetBSD, but with a remote backend.
@rafaelmartins
rafaelmartins / .Xresources
Last active November 21, 2016 02:18
rxvt-unicode settings for gnome-terminal-like colors
URxvt.scrollBar: false
URxvt*background: #000000
URxvt*foreground: #CCCCCC
URxvt*color0: #000000
URxvt*color1: #CC0000
URxvt*color2: #4E9A06
URxvt*color3: #C4A000
URxvt*color4: #3465A4
@rafaelmartins
rafaelmartins / blohg_foo.py
Created January 15, 2014 00:00
Simple example of a blohg extension that mounts a view at the root of the flask app.
from blohg.ext import BlohgExtension
ext = BlohgExtension(__name__)
def foo():
return 'Hello world!'
@ext.setup_extension
@rafaelmartins
rafaelmartins / balde-album.c
Last active August 29, 2015 14:05
balde-album: Yet another web gallery.
/**
* balde-album: Yet another web gallery.
* Copyright (C) 2014 Rafael G. Martins <rafael@rafaelmartins.eng.br>
*
* This program can be distributed under the terms of the LGPL-2 License.
*/
/**
* TGV 9713 - PARIS GARE LYON -> BARCELONA SANTS - August 12, 2014 - 10:07
*

Keybase proof

I hereby claim:

  • I am rafaelmartins on github.
  • I am rafaelmartins (https://keybase.io/rafaelmartins) on keybase.
  • I have a public key whose fingerprint is 8D9C 25D7 0251 69DE 4C45 7A65 3EF7 4952 E894 ABDE

To claim this, I am signing this object:

@rafaelmartins
rafaelmartins / pybr9pybr9_app.py.py
Created March 18, 2015 20:27
pybr9/pybr9_app.py
# -*- coding: utf-8 -*-
import os, sys
sys.path.insert(0, '/srv/apps/pybr9/src')
from pybr9 import create_app
import logging
stream_handler = logging.StreamHandler(sys.stderr)
@rafaelmartins
rafaelmartins / upload.c
Last active August 29, 2015 14:27
balde - image upload example
/*
* This is a simple (and naive) example of image upload using balde. It saves
* the image in a temporary directory with the SHA1 checksum as the file name.
* Also, it supports only JPEG files, and the validation is very weak. It's
* just an usage example. :)
*
* After uploading the image, the client will be redirected to a page with
* the image, from the 'picture' endpoint, that shows the last uploaded iamge.
*
* To build it:
SLOC Directory SLOC-by-Language (Sorted)
11454 tests ansic=8934,sh=2520
7796 src ansic=7661,python=135
Totals grouped by language (dominant language first):
ansic: 16595 (86.21%)
sh: 2520 (13.09%)
python: 135 (0.70%)
@rafaelmartins
rafaelmartins / Saitek X52 Pro Flight Control System - Linux.joy
Last active May 10, 2017 23:58
Saitek X52 Pro settings for X-Plane 11 (Linux) - Just download this file to 'X-Plane 11/Resources/joystick configs'
I
1100 version
JOY
OS: Linux
Name: Saitek Saitek X52 Pro Flight Control System
Display: Saitek X52 Pro
Assignments:
--------------------------------------------------------------