Skip to content

Instantly share code, notes, and snippets.

class StanfordParser <Formula
url 'http://nlp.stanford.edu/software/stanford-parser-2010-02-26.tgz'
homepage 'http://nlp.stanford.edu/software/lex-parser.shtml'
md5 '25e26c79d221685956d2442592321027'
version '1.6.2'
JAR = 'stanford-parser.jar'
def install
# install files into directories
(prefix+"lib").install Dir["*.jar"]
# This script just get the latest tracks of your friends on Last.fm and recommends those more popular.
# It's all based on a conversation between @mort, @rochgs, @littlemove and me (mainly by @mort)
# INSTRUCTIONS
# 1. Install lastfm gem: https://github.com/youpy/ruby-lastfm/
# gem install lastfm
# 2. Get a Last.fm API Key on http://www.lastfm.es/api
require 'lastfm'
"""
A redis autocomplete example for multi-word phrases.
Based on:
Ruby original: http://gist.github.com/574044
Python original: https://gist.github.com/577852
See options below for usage
Requires http://github.com/andymccurdy/redis-py/
@mt3
mt3 / create_django_heroku_project.sh
Created August 21, 2011 09:00 — forked from tkopczuk/create_django_heroku_project.sh
Script to create a new Heroku-ready Django project.
#!/bin/bash
mkdir prancing_heroku
cd prancing_heroku
django-admin.py startproject prancing_heroku
echo "Django==1.3" > requirements.txt
echo "psycopg2" >> requirements.txt
echo "web: prancing_heroku/run_heroku_run.sh" > Procfile
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
@mt3
mt3 / fabfile.py
Created August 21, 2011 14:12 — forked from onyxfish/fabfile.py
Chicago Tribune News Applications fabric deployment script
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"
@mt3
mt3 / uninstall_homebrew.sh
Created September 26, 2011 06:56 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
cd `brew --prefix`
git ls-files -z | pbcopy
rm -rf Cellar
bin/brew prune
pbpaste | xargs -0 rm
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
#!/bin/zsh
# Copyleft 2010 paradoxxxzero All wrongs reserved
# With contribution from James Ahlborn
# https://gist.github.com/752727
# Fork of https://gist.github.com/586698 by nicoulaj / dingram / roylzuo ...
# From http://www.zsh.org/mla/users/2010/msg00692.html
# Token types styles.
# See http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135
@mt3
mt3 / mann-quix.txt
Created March 13, 2012 07:27
Merlin Mann's Custom Quix Commands
> Merlin Mann's Custom Quix Commands
> TITLE: mann-quix-d.txt
> REMARKS: Hello, world. Under construction. Dilute! Dilute!
> GITHUB: http://gist.github.com/290059
> MORE: http://quixapp.com
> UPDATED: 2010-02-07_13-07-54
@Merlin Mann's Custom Quix Commands
@May organize these better once they all stabilize
bit javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.js');document.body.appendChild(e);void(0); Make a bit.ly link
cal javascript:var%20s;if(window.getSelection){s=window.getSelection();}else{s=document.selection.createRange().text;}var%20t=prompt('Please%20enter%20a%20description%20for%20the%20event',s);if(t){void(window.open(encodeURI('http://www.google.com/calendar/event?ctext='+t+'&action=TEMPLATE&pprop=HowCreated%3AQUICKADD'),'gcal'));}else{void(s);} Add event to Google Calendar
@mt3
mt3 / icwsm.py
Created March 20, 2012 06:40 — forked from jhofman/icwsm.py
script to scrape pdfs and paper info for icwsm2011
#!/usr/bin/env python
from lxml import etree
from urllib import urlopen
if __name__=='__main__':
url = 'http://www.aaai.org/ocs/index.php/ICWSM/ICWSM11/schedConf/presentations'
tree = etree.parse(urlopen(url), etree.HTMLParser())