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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 21, host: 2121 |
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
<!--[if lt IE 9]> | |
<script src="//html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> | |
<![endif]--> |
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
(function($){ | |
var div; | |
$.fn.outerHTML = function() { | |
var elem = this[0], | |
tmp; | |
return !elem ? null | |
: typeof ( tmp = elem.outerHTML ) === 'string' ? tmp | |
: ( div = div || $('<div/>') ).html( this.eq(0).clone() ).html(); |
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
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout site.key -out site.crt |
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
# on local machine you want to be able to remotely login to server "b" | |
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' |
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
1. sudo apt-get update | |
2. sudo apt-get install isc-dhcp-server | |
3. sudo nano /etc/default/isc-dhcp-server | |
> UPDATE LINE | |
INTERFACES="wlan0" | |
4. sudo nano /etc/dhcp/dhcpd.conf |
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/bash | |
# | |
# Creates backup files (bson) of all MongoDb databases on a given server. | |
# Default behaviour dumps the mongo database and tars the output into a file | |
# named after the current date. ex: 2011-12-19.tar.gz | |
# | |
### Set server settings | |
HOST="localhost" | |
PORT="27017" # default mongoDb port is 27017 |
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
Setup Wifi Infrastructure Network on RPi 2 | |
1. | |
apt-get update | |
apt-get upgrade | |
2. | |
apt-get install hostapd udhcpd |
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/bash | |
# | |
# Summary: | |
# Exeucute Node.JS projects with 'long path' npm dependancies | |
# while using Vagrant on Windows | |
# | |
# Description: | |
# Vagrant with a Windows host and a Linux guest has issues with | |
# very long paths between shared folders. The goal of this script | |
# is to solve the problem by copying, syncing, and updating dependancies |
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
#!/usr/bin/env node | |
// required packages | |
// npm install walk | |
// libraries | |
var walk = require('walk'); | |
// globals | |
var args = process.argv.splice(2); |