This file contains hidden or 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
import sys | |
sys.path.insert(0, 'cherrypy.zip') | |
sys.path.insert(0, 'mako.zip') | |
import cherrypy | |
from cherrypy import tools | |
from mako.template import Template | |
from mako.lookup import TemplateLookup | |
import wsgiref.handlers | |
This file contains hidden or 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 -x | |
# git name-rev is fail | |
CURRENT=`git branch | grep '*' | awk '{print $2}'` | |
git checkout master | |
git pull origin master | |
git checkout ${CURRENT} | |
git rebase master |
This file contains hidden or 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 -x | |
# git name-rev is fail | |
CURRENT=`git branch | grep '*' | awk '{print $2}'` | |
git checkout master | |
git pull origin master | |
git checkout ${CURRENT} | |
git merge master |
This file contains hidden or 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 -x | |
CURRENT=`git branch | grep '*' | awk '{print $2}'` | |
MSG="hitting the pause button" | |
if [ $# -ne 0 ]; then | |
MSG="$1" | |
fi | |
git add . | |
git commit -m "${MSG}" | |
git push origin ${CURRENT} |
This file contains hidden or 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
import cherrypy | |
from cherrypy._cpdispatch import PageHandler, LateParamPageHandler | |
import routes | |
import logging | |
import yaml | |
REST_METHODS = ('GET','PUT','POST','DELETE') | |
def is_form_post(environ): | |
"""Determine whether the request is a POSTed html form""" |
This file contains hidden or 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
A collection of Rack middleware, found all over the internet and part of Merb's core. |
This file contains hidden or 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
This is Merb middleware to set a session cookie when the request comes from flash. | |
You must first require the module, then invoke it's use in the call chain in either rack.rb or config.ru. | |
Examples below. Note that SWFUPload by default adds a lot of post parameters with non-standard | |
ruby variable names, so merb-action-args will choke a bit on that unless you customize SWFupload | |
or just not use action-args. | |
Also note that the session information must be set as a GET parameters, e.g. in the URL request like so: | |
This file contains hidden or 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 | |
/Applications/GitX.app/Contents/MacOS/GitX `pwd` >& /dev/null & |
This file contains hidden or 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
package mz | |
{ | |
import flash.filesystem.File; | |
import flash.filesystem.FileMode; | |
import flash.filesystem.FileStream; | |
import flash.utils.Dictionary; | |
public class MzXml | |
{ | |
/** | |
* A random access parser for mzXML files. |
This file contains hidden or 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
The warm weather has me thinking about prok ribs. Thought I would share my secret sauce, I guess now making it public sauce. | |
Per rack of baby-back rib: | |
1 tsp Diced ginger (you know from a jar) | |
2 big cloves garlic (diced) | |
1 tbsp Kosher salt | |
1 tbsp suger | |
pepper to taste |
OlderNewer