This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |