Skip to content

Instantly share code, notes, and snippets.

View ezgoodnight's full-sized avatar

Eric Z Goodnight ezgoodnight

View GitHub Profile
@rtorr
rtorr / gist:2493270
Created April 25, 2012 20:54
Temporary fix for using symlinks with google drive (gdrive) on mac
Because gdrive will not actually sync symlinks from your computer to gdrive, you should temporarily do the opposite.
For example, I wanted to have a symlink from my ~/Sites directory to automatically sync with gdrive, so i did the simple command:
ln -s ~/Sites/drive ~/Google\ Drive/mSites/
That will not sync at the moment.
So instead I made a directory in gdrive and did a symlink back in my ~/Sites directory
@DavidWittman
DavidWittman / hubot.conf
Created March 6, 2012 05:55
Hubot Upstart Script
# hubot
description "Hubot Campfire bot"
author "David Wittman <[email protected]>"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/opt/hubot/'
@tskrynnyk
tskrynnyk / ufw-script.sh
Last active August 20, 2024 19:05
Simple ufw script
#!/bin/sh
# ufw script
#
ufw disable
ufw --force reset
NET_PRIVATE_ADDR=(10.0.0.0/8 172.16.0.0/12 192.168.0.0/16)
for i in ${NET_PRIVATE_ADDR[@]}; do ufw allow from $i to any app 'SSH'; done
for i in ${NET_PRIVATE_ADDR[@]}; do ufw allow from $i to any app 'WWW Full'; done
@s4y
s4y / gist:1215700
Created September 14, 2011 02:12
child_process.execFile example
var child_process = require('child_process');
// exec: spawns a shell.
child_process.exec('ls -lah /tmp', function(error, stdout, stderr){
console.log(stdout);
});
// execFile: executes a file with the specified arguments
child_process.execFile('ls', ['-lah', '/tmp'], function(error, stdout, stderr){
console.log(stdout);