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
Show hidden characters
// installed Clojure packages: | |
// | |
// * BracketHighlighter | |
// * lispindent | |
// * SublimeREPL | |
// * sublime-paredit | |
{ | |
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?", | |
"paredit_enabled": true, |
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
{:user {:dependencies [[org.clojure/tools.namespace "0.2.3"] | |
[spyscope "0.1.3"] | |
[criterium "0.4.1"]] | |
:injections [(require '(clojure.tools.namespace repl find)) | |
; try/catch to workaround an issue where `lein repl` outside a project dir | |
; will not load reader literal definitions correctly: | |
(try (require 'spyscope.core) | |
(catch RuntimeException e))] | |
:plugins [[lein-pprint "1.1.1"] | |
[lein-beanstalk "0.2.6"] |
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 | |
rm -Rf ~/.m2 | |
rm -Rf ~/.lein | |
rm -Rf ./target | |
lein self-install | |
lein clean | |
lein version |
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 starcluster.clustersetup import ClusterSetup | |
from starcluster.logger import log | |
class doRedis(ClusterSetup): | |
def __init__(self): | |
pass | |
def run(self, nodes, master, user, user_shell, volumes): | |
redis_master_ip = master.private_ip_address | |
command = """su - arnaudsj -c "nohup R --slave -e 'require(multicore);require(doRedis);startLocalWorkers(n=multicore:::detectCores(),host=\\\"%s\\\",queue=\\\"jobs\\\", port=6379)' > /dev/null 2>&1 &" """ % redis_master_ip | |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# Build and Launch iPhone Application in Simulator or install | |
# the application on the device via iTunes | |
# | |
import os, sys, uuid, subprocess, shutil, signal, string, traceback, imp | |
import platform, time, re, run, glob, codecs, hashlib, datetime, plistlib | |
from compiler import Compiler |
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
if [ -f "${TM_PROJECT_DIRECTORY}/.couchapprc" ]; then | |
/usr/local/Cellar/python/2.7/bin/couchapp push | |
fi |
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
####################### | |
#### DOCUMENTATION #### | |
####################### | |
# | |
# Run as: | |
# | |
# ruby phonegap-sc.rb APP_NAME | |
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH | |
# ruby phonegap-sc.rb APP_NAME PROJECT_PATH OUTPUT_PATH | |
# |
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
import logging | |
import random | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web | |
from tornado.options import define, options |
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 | |
# | |
# Jamie Kirkpatrick, November 2009. <[email protected]> | |
# Released under the BSD license. | |
# | |
""" | |
Experimental code to add asyncronous functionality to WSGI applications | |
running under the Tornado webserver. Uses greenlet to spin micro-threads | |
which can be suspended and resumed within a single thread as required. |