Skip to content

Instantly share code, notes, and snippets.

View zodman's full-sized avatar
Code wins arguments!

Andres Vargas zodman

Code wins arguments!
View GitHub Profile
View gist:56833
from conary.conaryclient import ConaryClient
cli = ConaryClient()
trove_list = cli.db.getTroveList("gimp")
for trove in trove_list:
print "Info about: %s "% trove.getName()
meta_dict = trove.getAllMetadataItems()[0]
zodman / gist:120125
Created May 29, 2009 18:34
a very basic command line frontend to the rbo package search
View gist:120125
# Copyright (c) 2009 Mark Trompell <>
# This file is distributed under the terms of the MIT License.
# A copy is available at
# a very basic command line frontend to the rbo package search
import urllib2,sys,string,os
from HTMLParser import HTMLParser
zodman / gist:130979
Created June 16, 2009 23:26
lo que antes no se podia hacer
View gist:130979
from import BarcodeCode128
from import Drawing
from import renderPDF
from reportlab.pdfgen.canvas import Canvas
from reportlab.platypus import Paragraph, Frame
from reportlab.lib.units import mm
from import code128
import os,sys
import easygui
zodman /
Created July 22, 2009 19:12
a small script for get info package on foresight
import urllib
import re
URL =""
class ForesightPackageNotFound(Exception):
class ForesightInfo:
def __init__(self, repository, package_name):
View gist:153453
class GnomeDo(AutoPackageRecipe):
name = 'gnome-do'
version = '0.8.0'
buildRequires = [ 'gnome-common:runtime', 'gnome-common:devel', 'autoconf:runtime', 'automake:runtime', 'desktop-file-ut
ls:runtime', 'gnome-sharp:devellib', 'gnome-sharp:cil', 'gtk-sharp:cil', 'gtk-sharp:devellib', 'm4:runtime', 'mono:devel', '
ono:lib', 'mono:runtime', 'ndesk-dbus-glib:devellib', 'ndesk-dbus-glib:cil', 'ndesk-dbus:devellib', 'ndesk-dbus:cil', 'pkgco
fig:devel', 'gettext:runtime', 'intltool:runtime', 'atk:devel', 'cairo:devel', 'expat:devel', 'fontconfig:devel', 'freetype:
evel', 'gtk:devel', 'libX11:devel', 'libXrender:devel', 'libpng:devel', 'libxcb:devel', 'pango:devel', 'pixman:devel', 'xcb-
til:devel', 'zlib:devel', 'gnome-desktop-sharp:cil', 'gnome-desktop-sharp:devellib', 'gnome-keyring-sharp:cil', 'gnome-keyri
g-sharp:devellib', 'mono-addins:cil', 'mono-addins:devellib', 'GConf:runtime', 'notify-sharp:cil', 'notify-sharp:devellib' ]
View gist:164865
In [1]: file = """
...: package_name = openssl
...: summary = A general purpose cryptography library with TLS implementation # one line
...: description = \"\"\"The OpenSSL toolkit provides support for secure communications between
...: machines. OpenSSL includes a certificate management tool and shared
...: libraries which provide various cryptographic algorithms and
...: protocols.\"\"\" # multiline
zodman / cherokee config
Created December 9, 2009 00:56
View cherokee config
config!version = 000099031
server!bind!1!port = 80
server!chunked_encoding = 1
server!iocache = 1
server!keepalive = 1
server!keepalive_max_requests = 500
server!panic_action = /usr/bin/cherokee-panic
server!pid_file = /var/run/
server!server_tokens = full
server!thread_number = 3
zodman /
Created December 9, 2009 01:16
fake smtp
#!/usr/bin/env python
# -*- mode:Python; tab-width: 4 -*-
from __future__ import generators
"""Simulate an SMTP server for debugging purposes.
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 (at your option) any later version.
zodman / Memory Usage
Created December 9, 2009 16:45
Memory usage
View Memory Usage
#!/usr/bin/env python
# Try to determine how much RAM is currently being used per program.
# Note per _program_, not per process. So for example this script
# will report RAM used by all httpd process together. In detail it reports:
# sum(private RAM for program processes) + sum(Shared RAM for program processes)
# The shared RAM is problematic to calculate, and this script automatically
# selects the most accurate method available for your kernel.
# Author:
#! /usr/bin/env python
# - HTTP proxy to simulate dial-up access
# Copyright (c) 2007 Johann C. Rocholl <>
# 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,