Skip to content

Instantly share code, notes, and snippets.

View BruceMWhealton's full-sized avatar

Bruce Whealton BruceMWhealton

View GitHub Profile
<MediaContainer size="19" allowCameraUpload="0" allowChannelAccess="1" allowSharing="1"
allowSync="0" backgroundProcessing="1" companionProxy="1" diagnostics="logs,databases"
eventStream="1" friendlyName="brucemwhealton" hubSearch="1" machineIdentifier="4963b3948e60d4a605a3e3408facb109183df256"
multiuser="1" myPlex="1" myPlexMappingState="unknown" myPlexSigninState="none" myPlexSubscription="0" platform="Linux"
platformVersion="4.4.0-21-generic (#37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016)" pluginHost="1" readOnlyLibraries="0"
requestParametersInCookie="1" streamingBrainVersion="1" sync="1" transcoderActiveVideoSessions="0" transcoderAudio="1"
transcoderLyrics="1" transcoderPhoto="1" transcoderSubtitles="1" transcoderVideo="1"
transcoderVideoBitrates="64,96,208,320,720,1500,2000,3000,4000,8000,10000,12000,20000"
transcoderVideoQualities="0,1,2,3,4,5,6,7,8,9,10,11,12"
transcoderVideoResolutions="128,128,160,240,320,480,768,720,720,1080,1080,1080,1080" updatedAt="1479286062"
bruce@brucemwhealton:~$ sudo service docker start
[sudo] password for bruce:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
bruce@brucemwhealton:~$ journalctl -xe
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit docker.service has failed.
--
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
bruce@ubuntu:~$ cd Mining-the-Social-Web-2nd-Edition/
bruce@ubuntu:~/Mining-the-Social-Web-2nd-Edition$ ls
CONTRIBUTING.md deploy images ipynb LICENSE.txt mtsw2e-requirements.txt README.md Vagrantfile
bruce@ubuntu:~/Mining-the-Social-Web-2nd-Edition$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'precise64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'precise64' (v0) for provider: virtualbox
@BruceMWhealton
BruceMWhealton / gist:83aa86a3766e90b8534a8e59069403f2
Created May 18, 2016 10:43
Output of Vagrant up for MiningTheSocialWeb2E
~/repos/Mining-the-Social-Web-2nd-Edition$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'precise64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'precise64' (v0) for provider: virtualbox
default: Downloading: http://files.vagrantup.com/precise64.box
==> default: Successfully added box 'precise64' (v0) for 'virtualbox'!
==> default: Importing base box 'precise64'...
@BruceMWhealton
BruceMWhealton / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Deploying a node app with Forever is great...until your server restarts unexpectedly. Then your app stops running and you have to re-deploy.

To get around this, we're going to run our node app as an Upstart service. Upstart services are great, because, once started, the system auto-restarts them if they fail, or if the server restarts.

###Step 1: Create a service for your node app

  • ssh in as root ssh root@youripaddress
  • Create a node-app.conf file in /etc/init
    IMPORTANT: whatever filename you pick is what you will use to start|stop|restart your service i.e. service node-app start
Netmask Netmask (binary) CIDR Notes
_____________________________________________________________________________
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr)
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
255.255.255.240 11111111.11111111.11111111.11110000 /28 14 useable
255.255.255.224 11111111.11111111.11111111.11100000 /27 30 useable
255.255.255.192 11111111.11111111.11111111.11000000 /26 62 useable
255.255.255.128 11111111.11111111.11111111.10000000 /25 126 useable

###Prerequesites

Install flightplan globally

npm install -g flightplan

Install flightplan in your project folder