This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
# Author: [email protected] | |
from __future__ import with_statement | |
from optparse import OptionParser | |
import os | |
parser = OptionParser(version="new9 command v1.0 -- by [email protected]") | |
parser.add_option("-p", "--install", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapy import log | |
from scrapy.contrib.spiders import CrawlSpider, Rule | |
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor | |
from scrapy.xpath.selector import HtmlXPathSelector | |
from scrapy.item import ScrapedItem | |
def safecn(i): | |
try: | |
return unichr(int(i)) | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
from twill import * | |
import urllib2,re | |
USERNAME = 'YOUR USERNAME' | |
PASSWORD = 'YOUR PASSWORD' | |
BLOG_LIST = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" A simple URI Encoding/Decoding commandline tool. | |
""" | |
__author__ = 'David Schoonover <[email protected]>' | |
__date__ = '2009-06-05' | |
__version__ = (0, 0, 1) | |
import sys, select, urllib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install postgresql | |
==> Downloading http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/source/v8.4.2/postgresql-8.4.2.tar.bz2 | |
######################################################################## 100.0% | |
==> ./configure --enable-thread-safety --with-bonjour --with-python --with-perl --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxsl | |
==> make install | |
==> Caveats | |
If this is your first install, create a database with: | |
initdb /usr/local/var/postgres | |
Automatically load on login with: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes | |
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/ | |
# Work with 64bit kernel mode | |
set -e | |
PREFIX=/usr/local | |
# Passenger users: amend your Apache global configuration with the following directive | |
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Further reading: | |
# Template builtins: http://docs.djangoproject.com/en/1.1/ref/templates/builtins/ | |
# Generic view reference: http://docs.djangoproject.com/en/1.1/ref/generic-views/ | |
# | |
#### entries/urls.py | |
from django.conf.urls.defaults import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reads from the | |
* stream <code>in</code> a representation | |
* of a Unicode character string encoded in | |
* <a href="DataInput.html#modified-utf-8">modified UTF-8</a> format; | |
* this string of characters is then returned as a <code>String</code>. | |
* The details of the modified UTF-8 representation | |
* are exactly the same as for the <code>readUTF</code> | |
* method of <code>DataInput</code>. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get "/about" => 'info#about', :as => 'about' | |
get "/privacy" => 'info#privacy', :as => 'privacy' | |
get "/license" => 'info#license', :as => 'license' | |
get "/mission" => 'info#mission', :as => 'mission' | |
get "/contact" => 'info#contact', :as => 'contact' |
OlderNewer