Skip to content

Instantly share code, notes, and snippets.

View marsam's full-sized avatar
🇵🇸
From the river to the sea, Palestine will be free 🇵🇸

Mario Rodas marsam

🇵🇸
From the river to the sea, Palestine will be free 🇵🇸
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import urllib
import urllib2
def get_datetime():
@marsam
marsam / users.sql
Created August 29, 2011 03:15
Users in PostgreSQL
CREATE USER project_user
WITH PASSWORD 'password';
CREATE DATABASE project;
GRANT ALL PRIVILEGES ON DATABASE project
TO project_user;
DROP DATABASE project;
DROP USER project_user;

"No despilfarres tu tiempo con gente insustancial"

Extractos de la entrevista a William H. Stone

Fórmula Stone para el Éxito

@marsam
marsam / rst2html.py
Created September 3, 2011 16:42
rst2html.py with source-code directive
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
A minimal front end to the Docutils Publisher, producing HTML.
Pygments: external/rst-directive.py
"""
try:
@marsam
marsam / pi.py
Created September 6, 2011 13:41
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Estimation of Pi using the Mandlebrot set
http://en.wikipedia.org/wiki/Mandelbrot_set
http://code.activestate.com/recipes/577584-amazing-estimation-of-pi-using-the-mandlebrot-set/
https://home.comcast.net/%7Edavejanelle/mandel.pdf
"""
@marsam
marsam / steve_yegge.rst
Created November 9, 2011 21:27
Steve Yegge post

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall

@marsam
marsam / cv.tex
Created November 27, 2011 00:59
\documentclass[a4paper,10pt]{article}
%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec} %for loading fonts
\usepackage{xunicode,xltxtra,url,parskip} %other packages for formatting
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[big]{layaureo} %better formatting of the A4 page
% an alternative to Layaureo can be ** \usepackage{fullpage} **
@marsam
marsam / two-col-cv.tex
Created November 27, 2011 00:59
Two column cv
% ----------------------------------------------------------------------------------------%
% Created by Alessandro with TeXShop %
% ----> May 27, 2009 %
% Compiled with XeLaTeX, on Mac OS X %
% Licensed under the Creative Commons Attribution 3.0 Unported %
% Share, change, spread, and have fun! %
% http://creativecommons.org/licenses/by/3.0/ %
% You can find more at http://aleplasmati.comuv.com %
% ----------------------------------------------------------------------------------------%
% ----------------------------------------------------------------------------------------%
% Created by Alessandro with TeXShop %
% ----> Sep 1, 2009 %
% Compiled with XeLaTeX, on Mac OS X 10.5 %
% Licensed under the Creative Commons Attribution 3.0 Unported %
% Share, change, spread, and have fun! %
% http://creativecommons.org/licenses/by/3.0/ %
% You can find more at http://cv-templates.info %
% ----------------------------------------------------------------------------------------%
\documentclass[a4paper,10pt]{article}
%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec} %load fonts
\usepackage{url,parskip} %formatting
\usepackage{xunicode,xltxtra} %other packages for XeTeX
%Graphics - Colors
\RequirePackage{color,graphicx}