Skip to content

Instantly share code, notes, and snippets.

View rbistolfi's full-sized avatar

Rodrigo Bistolfi rbistolfi

View GitHub Profile
@rbistolfi
rbistolfi / go.mod
Last active April 12, 2022 20:23
Mini IRC client for making the quaraintein bearable
module irc
go 1.18
require (
github.com/charmbracelet/bubbletea v0.20.0
github.com/jiyeyuran/go-eventemitter v1.4.0
)
require (
@rbistolfi
rbistolfi / dualmethod.py
Last active August 29, 2015 14:04
Python class and instance methods that can share a name
# coding: utf-8
"""Instance and class methods that can share a name"""
class DualMethod(object):
"""A method that can be called as instance method and as class method
>>> class Test(object):
@rbistolfi
rbistolfi / sp.py
Last active December 22, 2015 15:49
# coding: utf-8
"Non blocking subprocess wrapper"
from Queue import Queue, Empty
from subprocess import Popen, PIPE
from threading import Thread
import shlex
-- example.lua
-- example of VASM framework
-- rbistolfi
vasm = require("vasm")
model = vasm.model
-- Create controller object
@rbistolfi
rbistolfi / ddg.py
Created June 25, 2013 19:45
Lalita plugin for ddg definitions
# -*- coding: utf8 -*-
# Copyright 2009 laliputienses
# License: GPL v3
# For further info, see LICENSE file
import json
import urllib
from twisted.web import client
#!/bin/env python
"""Media handling. Implements objects providing methods
for mounting, umounting, formating and querying media.
"""
__author__ = "rbistolfi"

PVC API

The packages.vectorlinux.com API.

@rbistolfi
rbistolfi / portada.html
Created February 28, 2013 15:08
Python tutorial spanish translation home page
<!DOCTYPE html>
<html>
<head>
<meta charser="UTF-8">
<style>
html {
font-family: sans-serif;
margin: auto;
padding: 0;
}
@rbistolfi
rbistolfi / googlemaps.py
Created February 28, 2013 00:16
Google maps rest extension for Nikola
# Copyright (c) 2012 Roberto Alsina y otros.
# 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:
@rbistolfi
rbistolfi / html_canvas.py
Created June 11, 2012 23:10
Seaside like HTMLCanvas in Python
# coding: utf8
"""
Proof of concept of a Seaside like HTMLCanvas object
>>> html = HTMLCanvas()
>>> with html.div(id="content"):
>>> with html.ul():
>>> html.li("Foo")