Skip to content

Instantly share code, notes, and snippets.

@mAAdhaTTah
mAAdhaTTah / test
Last active August 29, 2015 14:23
var http = require('http');
var _ = require('lodash');
// An HTTP server for an quick EventEmitter example. Works just like a socket.
var server = http.createServer(function(req, res) {
console.log('Reqest incoming...');
});
// This will not cause an error since partial is invoked after socket gets passed into the function.
server.on('connection', function(socket) {
@mAAdhaTTah
mAAdhaTTah / plugin-deploy.sh
Last active August 29, 2015 14:15 — forked from scribu/plugin-deploy.sh
Git-to-SVN Plugin Deploy by Scribu
#!/usr/bin/env bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/$DIR_NAME/$BRANCH
@mAAdhaTTah
mAAdhaTTah / npm-upgrade-bleeding.sh
Last active August 29, 2015 14:07 — forked from othiym23/npm-upgrade-bleeding.sh
Upgrade npm to latest/bleeding
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@mAAdhaTTah
mAAdhaTTah / 1_netatalk-3-install-on-ubuntu-14.04.sh
Last active December 11, 2019 16:20 — forked from beshkenadze/1_netatalk-3-install-on-debian-7
Shell script to install Netatalk 3 on Ubuntu 14.04
# Get root:
sudo su
# Install prerequisites:
apt-get install build-essential pkg-config checkinstall git avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev
# Build libevent from source:
cd /usr/local/src