Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Define some Constants as Variables
SCRIPT_VERSION="0.9.9"
RUBYGEMS_FILENAME="rubygems-1.3.5.tgz"
RUBYGEMS_FOLDER="rubygems-1.3.5"
RUBYGEMS_SOURCE="http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz"
SPAWNFCGI_FILENAME="spawn-fcgi-1.6.2.tar.gz"
@ieure
ieure / python-pep8.el
Created February 12, 2010 18:49
Run pep8.py on Python source in Emacs.
;;; python-pep8.el --- minor mode for running `pep8'
;; Copyright (c) 2009, 2010 Ian Eure <ian.eure@gmail.com>
;; Author: Ian Eure <ian.eure@gmail.com>
;; Keywords: languages python
;; Last edit: 2010-02-12
;; Version: 1.01
@danpaluska
danpaluska / uploader2.py
Created March 2, 2010 18:06
youtube uploading python script.
from gdata.youtube import YouTubeVideoEntry
from gdata.youtube.service import YouTubeService
import gdata
from gdata.service import BadAuthentication, CaptchaRequired
from optparse import OptionParser
import sys
import time
import os
@defunkt
defunkt / installing-mustache-mode.el.md
Created March 6, 2010 10:11
Installing mustache-mode.el

https://github.com/mustache/emacs

In your shell:

cd ~/.emacs.d/vendor
curl -O https://github.com/mustache/emacs/raw/master/mustache-mode.el

In your Emacs config:

(add-to-list 'load-path "~/.emacs.d/vendor/mustache-mode.el")

import re
# http://atomboy.isa-geek.com/plone/Members/acoil/programing/double-metaphone
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
@vicalejuri
vicalejuri / django-crossdomainxhr-middleware.py
Created June 5, 2010 17:47
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
@danielstocks
danielstocks / page-nav.html
Created June 17, 2010 12:53
Django Template pagination for a generic object_list view
{% if page_range|length > 1 %}
<div id="pagination">
Page
{% for range in page_range %}
{% ifequal page range %}
{{ range }}
{% else %}
<a href="?page={{ range }}">{{ range }}</a>
{% endifequal %}
{% endfor %}
@simonklee
simonklee / nginx-uwsgi-django
Created June 22, 2010 06:41
nginx uwsgi django config
# FILE: /etc/init/uwsgi_[project].conf
description "uWSGI server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec uwsgi -s /tmp/uwsgi.sock -p 4 -M -t 20 -C -L \
-x [projectpath]/uwsgi.conf \
-H [projectpath]/ve \
config!version = 000099042
server!bind!1!port = 80
server!bind!1!tls = 0
server!group = www-data
server!ipv6 = 1
server!keepalive = 1
server!keepalive_max_requests = 500
server!panic_action = /usr/share/cherokee/cherokee-panic
server!pid_file = /var/run/cherokee.pid
server!server_tokens = full
@pyropeter
pyropeter / LICENSE
Last active June 7, 2021 16:49
PKGBUILD parser
Copyright (c) 2010 PyroPeter
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:
The above copyright notice and this permission notice shall be included in all