Skip to content

Instantly share code, notes, and snippets.

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active October 27, 2025 08:27
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
@tmpvar
tmpvar / node-jsdom-pure.js
Created December 5, 2010 20:24
basic example for getting node + jsdom + pure.js going
tmpmac:javascript tmpvar$ node node-jsdom-pure.js
<div id="template">
<div class="hello">
<span class="who">Hello Wrrrld</span>
</div>
</div>
@chao
chao / couchdb_ldap_auth.patch
Created January 18, 2011 07:32
Patch CouchDB to add LDAP authentication support
diff --git LICENSE LICENSE
index 20a425b..6a5c617 100644
--- LICENSE
+++ LICENSE
@@ -369,3 +369,25 @@ For the src/etap component:
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+For the src/eldap component:
+
@fdmanana
fdmanana / gist:832610
Created February 17, 2011 20:27
The CouchDB replicator database

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics

@mattpodwysocki
mattpodwysocki / nodeconf_2011.md
Created May 7, 2011 02:03 — forked from guybrush/nodeconf_2011.md
a list of slides from nodeconf 2011
@rbscott
rbscott / elasticsearch.conf
Created June 28, 2011 19:46
upstart job for elastic search
# ElasticSearch Service
description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
@max-mapper
max-mapper / using-couch-with-node.txt
Created July 15, 2011 00:14
using couchdb with node.js
There are three essential components for most flexibly interacting with CouchDB from node:
couch API documentation:
http://jpmens.net/2010/04/20/the-antepenultimate-couchdb-reference-card/
http://www.couchbase.org/sites/default/files/uploads/all/documentation/couchbase-api.pdf
javascript HTTP library:
http://github.com/mikeal/request
javascript _changes feed consuming libaries (pick one):
@phred
phred / pedantically_commented_playbook.yml
Last active July 24, 2025 08:51
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active June 2, 2025 17:14
Using Git with Subversion Mirroring for WordPress Plugin Development
@ck-on
ck-on / ocp.php
Last active October 26, 2025 04:00
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter