Skip to content

Instantly share code, notes, and snippets.

View btbytes's full-sized avatar

Pradeep Gowda btbytes

View GitHub Profile
@btbytes
btbytes / dan_pink_motivation.markdown
Created October 17, 2010 16:22
Dan Pink on the surprising science of motivation
  • Autonomy
  • Mastery
  • Purpose

Autonomy

  • FedEx Days -- Atlassian
  • 20% time
@btbytes
btbytes / clpython_install.txt
Created October 19, 2010 13:32
CLPython Quickstart
CLPython quick start guide:
Run a string of Python code: (CLPYTHON:RUN "for i in range(4): print i")
Run a Python file: (CLPYTHON:RUN #p"~/example/foo.py")
Start the Python "interpreter" (REPL): (CLPYTHON.APP.REPL:REPL)
To start mixed Python/Lisp input mode: (CLPYTHON.PARSER:ENTER-MIXED-LISP-PYTHON-SYNTAX)
Run the test suite: (ASDF:OPERATE 'ASDF:TEST-OP :CLPYTHON)
("clpython")
* (asdf:operate 'asdf:load-op :clpython)
@btbytes
btbytes / procer
Created October 21, 2010 15:45
NOT YET TESTED.
#!/bin/bash
#
# /etc/rc.d/init.d/procer
# procer This shell script takes care of starting and stoppning
# procer (the user space process manager)
# Author: Pradeep Gowda <pradeep@btbytes.com>
#
# Source function library.
. /etc/init.d/functions
@btbytes
btbytes / build.txt
Created October 21, 2010 17:46
build params
* Dev build:
* gcc -Wall -lzmq -o client client.c
*
* Normal build:
* gcc -O2 -DNDEBUG -lzmq -o client client.c && strip client
@btbytes
btbytes / lua_zmq_Makefile
Created October 21, 2010 22:25
Custom Lua-zmq Makefile
CC = gcc
CFLAGS = -I/opt/enth/include -fPIC -O3 -Wall
LFLAGS = -shared -L/opt/enth/lib -lzmq
INSTALL_PATH = /opt/enth/lib/lua/5.1
all: zmq.so
zmq.lo: zmq.c
$(CC) -o zmq.lo -c $(CFLAGS) zmq.c
$ npm install aws bcrypt canvas coffee-script commonjs redis connect-redis couchapp csv eco github html5 haml hamljs http-console hydra jpeg jquery jslint jsgi json json2 kyoto-tycoon less libxmljs log4js logging lynt markdown markdown-js mysql pg narwhal node-expat node-static png riak riak-js sass socket.io sqlite srand store.js test template underscore uuid websocket-server websocket-client webworker yaml yui-compressor yui3 zeromq
@btbytes
btbytes / brew_pg9.markdown
Created December 1, 2010 15:11
Brew install of PGSQL 9.x
#!/bin/bash
function flask-boilerplate-tmux
{
# https://github.com/swaroopch/flask-boilerplate
BASE="$HOME/src/flask-boilerplate"
cd $BASE
tmux start-server
tmux new-session -d -s flaskboilerplate -n model

In the interest of allowing you to run nginx without sudo, the default port is set to localhost:8080.

If you want to host pages on your local machine to the public, you should change that to localhost:80, and run sudo nginx. You'll need to turn off any other web servers running port 80, of course.

You can start nginx automatically on login with: cp /usr/local/Cellar/nginx/0.8.53/org.nginx.plist ~/Library/LaunchAgents launchctl load -w ~/Library/LaunchAgents/org.nginx.plist

@btbytes
btbytes / content_page.js
Created December 14, 2010 20:25
CloseThatHN
window.open('', '_self', ''); //bug fix
window.close();