Skip to content

Instantly share code, notes, and snippets.

@dwelch2344
dwelch2344 / installOpenVbx.sh
Last active February 11, 2018 22:24
A simple install script to setup OpenVbx on an Ubuntu 14.04 box
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME=openvbx
export DBUSER=openvbx
export DBPASS=openvbxPass
@staltz
staltz / introrx.md
Last active May 20, 2024 14:59
The introduction to Reactive Programming you've been missing
@elmarcoh
elmarcoh / install_node.sh
Created December 10, 2012 14:38
Install node & npm in virtualenv
#!/bin/sh
#
# This script will download NodeJS, NPM and lessc, and install them into you Python
# virtualenv.
#
# Based on a post by Natim:
# http://stackoverflow.com/questions/8986709/how-to-install-lessc-and-nodejs-in-a-python-virtualenv
NODEJS="http://nodejs.org/dist/v0.8.3/node-v0.8.3.tar.gz"
@jasonrudolph
jasonrudolph / about.md
Last active May 14, 2024 16:36
Programming Achievements: How to Level Up as a Developer
@uogbuji
uogbuji / gruber_urlintext.py
Created November 18, 2010 18:28
John Gruber's regex to find URLs in plain text, converted to Python/Unicode
#See: http://daringfireball.net/2010/07/improved_regex_for_matching_urls
import re, urllib
GRUBER_URLINTEXT_PAT = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))')
for line in urllib.urlopen("http://daringfireball.net/misc/2010/07/url-matching-regex-test-data.text"):
print [ mgroups[0] for mgroups in GRUBER_URLINTEXT_PAT.findall(line) ]
@shripadk
shripadk / gist:652819
Created October 29, 2010 03:10
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active May 16, 2024 16:51
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@weppos
weppos / capistrano_database_yml.rb
Created July 27, 2008 10:04
Provides a couple of tasks for creating the database.yml configuration file dynamically when deploy:setup is run.
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2010 The Authors