Skip to content

Instantly share code, notes, and snippets.

@olifante
olifante / gist:222879
Created October 31, 2009 01:46
Interview with Joe Armstrong & Simon Peyton Jones

extracted from http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell

I'm Sadek Drobi. I'm here at Erlang Factory with Simon Peyton Jones and Joe Armstrong. Can you please tell us about yourselves and what you've been busy with lately?

JA: I'm Joe Armstrong and I'm at Erlang Factory. I've just been to a very nice talk where Simon has told us about the birth of Haskell and Erlang and how they point along parallel routes solving the same problems. I think we can talk a bit about that, because in your lecture you said things about "We tried that

from django.core.paginator import ObjectPaginator
class QuickObjectPaginator(ObjectPaginator):
max_safe_pages = 0
def __init__(self, object_list, per_page, orphans=0, max_safe_pages=0):
self.max_safe_pages = max_safe_pages
super(QuickObjectPaginator, self).__init__(object_list, per_page, orphans)
def validate_page_number(self, page_number):
"Memcached cache backend"
from django.core.cache.backends import memcached
from django.utils.encoding import smart_unicode, smart_str
MIN_COMPRESS_LEN = 150000
class CacheClass(memcached.CacheClass):
def add(self, key, value, timeout=None, min_compress_len=MIN_COMPRESS_LEN):
if isinstance(value, unicode):
InfoQ have recently published a video of a very interesting interview with Rich Hickey, creator of the Clojure programming language. Conveniently, they also offer a transcript of the entire interview, but as is costumary with their transcripts, it is placed inside a very small text field, making for very awkward reading. Here's a copy of that transcript, extracted from http://www.infoq.com/interviews/hickey-clojure
Q: We are here at QCon London 2009, with Rich Hickey. Rich, who are you?
A: I'm the author of Clojure. I'm an independent developer, contractor, consultant and,
basically, a practitioner. I'm not a researcher.
Q: What brought you to create a Lisp? Do you go out in the morning and say "Hey, I'm bored!
Let's create the Lisp!"? What's the intention behind it?
@olifante
olifante / filter_through_command.py
Created February 25, 2012 20:20 — forked from jefftriplett/filter_through_command.py
Sublime Text 2: "Filter Through Command" plugin
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## based on http://pastie.org/private/bclbdgxzbkb1gs2jfqzehg
import sublime
import sublime_plugin
import subprocess
class PromptRunExternalCommand(sublime_plugin.WindowCommand):
@olifante
olifante / xml2db.rb
Created January 10, 2013 18:32 — forked from rkumar/xml2db.rb
#!/usr/bin/env ruby
=begin
* Name: xml.rb
* Description parses xml iTunes Music Library and inserts into database
so other apps can use, rather than each time parsing xml file
* Author: Original - Aaron Patterson (xml parsing portion)
http://groups.google.com/group/nokogiri-talk/browse_thread/thread/97973521c6f5f0dc
* Additions by rkumar
* Date: 2010-08-04
* License:
@olifante
olifante / itunes.sql
Last active December 10, 2015 22:49 — forked from rkumar/itunes.sql
/* create tables to store itunes music library data for quick access
- olifante 2013 January - added columns used by iTunes 11.0.1
- rkumar 2010 July
*/
-- drop table tracks;
create table tracks (
album_artist VARCHAR(50),
album_rating_computed INTEGER,
album_rating INTEGER,
album VARCHAR(50),
@olifante
olifante / gist:5306079
Last active December 15, 2015 18:48
Líder parlamentar do PSD admite extinção do Tribunal Constitucional: http://expresso.sapo.pt/lider-parlamentar-do-psd-admite-extincao-do-tribunal-constitucional=f734498
Líder parlamentar do PSD admite extinção do Tribunal Constitucional
http://expresso.sapo.pt/lider-parlamentar-do-psd-admite-extincao-do-tribunal-constitucional=f734498
A propósito da polémica que envolve a nomeação dos três novos juízes para o Tribunal Constitucional, o líder do grupo parlamentar do PSD Luís Montenegro considera que "muita coisa pode ser revista".
17:22 Quinta feira, 21 de junho de 2012
Na sequência da polémica com o PS, por causa da escolha dos candidatos a juízes para o Tribunal Constitucional, o líder do grupo parlamentar do PSD admite a extinção deste orgão. Em entrevista à Rádio Renascença, Luís Montenegro diz que muita coisa pode ser revista no futuro, até a existência do próprio Tribunal Constitucional.
"O PSD já teve um líder que o defendeu e eu também, a título meramente pessoal, dou abertura para a hipótese de (...) passarmos a ter uma secção constitucional no Supremo Tribunal de Justiça, com isso recolocando em cima da mesa não só o método de eleição e de recrutamento dos juíze

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart1411.flv
http://blip.tv/file/get/Richhickey-ClojureDataStructuresPart2306.flv
http://blip.tv/file/get/Richhickey-ClojureSequences733.flv
http://blip.tv/file/get/Richhickey-ClojureConcurrency252.flv
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers2Of2680.mov
http://blip.tv/file/get/Richhickey-ClojureForJavaProgrammers1Of2174.flv
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart2299.mov
http://blip.tv/file/get/Richhickey-ClojureForLispProgrammersPart1372.flv
http://blip.tv/file/get/Richhickey-HammockdrivenDevelopment465.mov
http://blip.tv/file/get/Richhickey-MichaelFogusFertileGroundTheRootsOfClojure492.mov