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
/* | |
* AppController.j | |
* NewApplication | |
* | |
* Created by You on July 5, 2009. | |
* Copyright 2009, Your Company All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> |
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/python | |
import cherrypy | |
print cherrypy.__version__ | |
class Root: | |
@cherrypy.expose | |
def index(self): | |
return "Hello world" |
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
darwin.compile.c++ bin.v2/libs/python/build/darwin-4.2.1/release/address-model-32_64/architecture-x86/pch-off/threading-multi/object/function_doc_signature.o | |
In file included from /usr/local/Cellar/python/2.7.1/include/python2.7/Python.h:126, | |
from ./boost/python/detail/wrap_python.hpp:142, | |
from ./boost/python/detail/prefix.hpp:13, | |
from ./boost/python/converter/registrations.hpp:8, | |
from libs/python/src/object/function_doc_signature.cpp:9: | |
/usr/local/Cellar/python/2.7.1/include/python2.7/modsupport.h:27: warning: ‘PyArg_ParseTuple’ is an unrecognized format function type | |
In file included from /usr/local/Cellar/python/2.7.1/include/python2.7/Python.h:126, | |
from ./boost/python/detail/wrap_python.hpp:142, | |
from ./boost/python/detail/prefix.hpp:13, |
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 | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
""" | |
run with: | |
gunicorn -w 1 --worker-class gevent web | |
open in a browser: | |
localhost:8000/consumer | |
localhost:8000/consumer | |
localhost:8000/producer |
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 flask import Flask | |
app = Flask(__name__) | |
from flask import session | |
from flask import redirect | |
from flask import url_for | |
from flask import escape | |
from flask import request | |
import functools |
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
@app.route("/forums/listposts/<shortname>") | |
def goodbye(shortname): | |
cu = current_user() | |
if cu: | |
return str(disqus.forums.listPosts(access_token=cu.access_token, forum=shortname)) | |
else: | |
return "not auth'd!" |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2267631/hack.sh | sh | |
# |
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
import json | |
import os | |
seed = [] | |
foo = os.path.expanduser("~/foo.json") | |
def load(): | |
with open(foo, 'r') as fp: | |
return json.load(fp) |
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/bash | |
# | |
# A git hook for automatically running commands | |
# based on the name of files modified in the | |
# previous changeset | |
# | |
# To install as a post-merge hook (on `git pull`): | |
# $ cp hook.sh .git/hooks/post-merge && chmod 755 $_ | |
# | |
# To install as a post-checkout hook (changing branches): |
OlderNewer