Skip to content

Instantly share code, notes, and snippets.

@marsam
marsam / mozplaces.py
Created June 21, 2013 21:56
useless example of mozilla places
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
https://developer.mozilla.org/en/docs/The_Places_database
"""
import os
import sqlite3
from django import http
from django.conf import settings
from django.utils.importlib import import_module
class DummyRequest(http.HttpRequest):
def __init__(self, POST=None):
super(DummyRequest, self).__init__()
self.method = POST and "POST" or "GET"
if POST is not None:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"quote": "There are two ways of constructing a software design: One way is to make it so\nsimple that there are obviously no deficiencies and the other way is to make it\nso complicated that there are no obvious deficiencies.",
"author": "C.A.R. Hoare, The 1980 ACM Turing Award Lecture"
},
{
"quote": "The computing scientist's main challenge is not to get confused by the\ncomplexities of his own making.",
"author": "E. W. Dijkstra"
},
{
@marsam
marsam / voice.py
Created January 10, 2013 16:31
Voice recognition using google webservice
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 ft=python cc=80
"""
Voice Recognition
=================
Voice recognition using google webservice
See: http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/speech/
@marsam
marsam / 80libros.txt
Last active May 21, 2017 13:49
podcasts & audiolibros
http://www.rtve.es/resources/TE_SMUN80L/mp3/4/2/1215022239124.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/5/4/1214851681945.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/8/6/1214850062568.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/1/7/1214835649071.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/6/1/1214833123816.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/2/9/1214482136992.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/3/8/1214477156783.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/9/5/1214473617359.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/9/9/1214471926299.mp3
http://www.rtve.es/resources/TE_SMUN80L/mp3/6/9/1214428837696.mp3
@marsam
marsam / SampleDBAcademic.sql
Created September 8, 2012 15:54
Academic Sample Database for PostgreSQL
--Sample PostgreSQL database of academic insitutions
--Created by "Binod Nepal"
--Email:[email protected]
--Version:1.0
--License:PostgreSQL License(http://www.postgresql.org/about/licence)
-- From: http://binodsblog.blogspot.com/2011/02/academic-sample-database-for-postgresql.html
CREATE SCHEMA "Office";
@marsam
marsam / pr.md
Created August 14, 2012 02:47 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@marsam
marsam / diario16.md
Created July 31, 2012 06:51
Analisis de la extensión del diario16

diario 16

Diario16, Imagen tomada por Ernesto Quiñones

A la fecha (31 julio del 2012) al acceder a la paágina web de diario16, se intenta intalar un extensión firefox desde libero.net:

$ curl -s 'http://diario16.pe/' | grep -n -i libero

1144:

#!/usr/bin/env python
"""
Sismos
======
Ultimos sismos reportados por el `Instituto Geofísico del Perú
<http://www.igp.gob.pe/sismologia/sismo/IGPSIS/sismos_reportados.htm>`_
DEPRECADO: El IGP ya no actualiza su página web