Skip to content

Instantly share code, notes, and snippets.

View parente's full-sized avatar
🦡

Peter Parente parente

🦡
View GitHub Profile
@dysinger
dysinger / simple-nginx-webdav.sh
Created January 5, 2010 20:32
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
# Make a new virtual env
# named ninjakitten
mkvirtualenv ninjakitten
cdvirtualenv
# Install readline binary
easy_install -a readline
# Install ipython
pip install -E . ipython
@igrigorik
igrigorik / webapp.rb
Created November 13, 2010 21:28
Inspired by @JEG2's talk at Rubyconf... Any ruby object, as a webapp! 'Cause we can. :-)
require 'rubygems'
require 'rack'
class Object
def webapp
class << self
define_method :call do |env|
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?)
[200, {}, send(func, *attrs)]
end
@joshwand
joshwand / What Killed Waterfall could Kill Agile.textile
Created November 22, 2010 23:50
What Killed Waterfall Could Kill Agile.

ganked from unreadable scribd doc here: http://cleancoder.posterous.com/what-killed-waterfall-could-kill-agile

What Killed Waterfall could Kill Agile.

Robert C. Martin
20 Nov, 2010

In 1970 a software engineer named Dr. Winston W. Royce wrote a seminal paper entitled Managing the Development of Large Software Systems. This paper described the software process that Royce felt was appropriate for large-scale systems. As a designer for the Aerospace industry, he was uniquely qualified.

He began the paper by setting up a straw-man process to knock down. He described this naïve process as “grandiose”. He depicted it with a simple diagram on an early page of his paper. Then the paper methodically tears this “grandiose” process apart. In the end, Royce proposed a far more nuanced and insightful approach, leaving the reader to giggle at the silliness of the “grandiose” model.

@mshuler
mshuler / github-mirror.sh
Created November 23, 2010 01:33
example github mirror from launchpad
#!/bin/sh
# OpenStack bzr to github mirror
#
# Requirements:
# git >= 1.7.0, bzr >= 2.0.0,
# git-bzr-ng, python-fastimport, patched bzr-fastimport
#####
# Set up unpackaged source:
# mkdir ~/src
@millermedeiros
millermedeiros / build.xml
Created February 13, 2011 20:57
RequireJS optimizer Ant task
<?xml version="1.0" encoding="utf-8"?>
<project name="sample-require-js" default="" basedir=".">
<!-- properties -->
<property name="r.js" value="_build/rjs/r.js" />
<property name="closure.jar" value="_build/closure/compiler.jar" />
<property name="rhino.jar" value="_build/rhino/js.jar" />
<property name="js.build" value="_build/js.build.js" />
<property name="css.build" value="_build/css.build.js" />
@superchink
superchink / show
Created April 20, 2011 22:42 — forked from tekacs/show
This does something essentially equivalent to showoff.io if you have a publicly facing server...
# Usage: show <local-port> <subdomain>
function show() {
DOMAIN=".webhostology.com"
REMOTE="$2$DOMAIN"
ssh -tR 8080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:8080 localhost"
}
@ncode
ncode / gsdproxy.py
Created July 10, 2011 16:01
gevent simple dynamic reverse proxy
#!/usr/bin/env python
from gevent import monkey
monkey.patch_all()
import sys
import redis
import urllib2
import traceback
from cgi import escape
# -- gsdproxy
@fabianp
fabianp / ranking.py
Last active February 1, 2024 10:02
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference:
"Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer 1999
"Learning to rank from medical imaging data." Pedregosa, Fabian, et al.,
Machine Learning in Medical Imaging 2012.
@agramfort
agramfort / ranking.py
Created March 18, 2012 13:10 — forked from fabianp/ranking.py
Pairwise ranking using scikit-learn LinearSVC
"""
Implementation of pairwise ranking using scikit-learn LinearSVC
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich,
T. Graepel, K. Obermayer.
Authors: Fabian Pedregosa <fabian@fseoane.net>
Alexandre Gramfort <alexandre.gramfort@inria.fr>
"""