> echo "Here we go"
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
import java.util.*; | |
class MovieDashboard { | |
public static void main(String[] args) { | |
System.out.println("Getting movies..."); | |
MovieLister mv = new MovieLister(); | |
Movie[] toWatch = mv.moviesDirectedBy("Quentin Tarantino"); | |
System.out.println (Arrays.toString(toWatch)); | |
} | |
} |
IP Addresses identify both a network as well as host on a network. Depending on the class of a network, certain amount of bits in the IP (32 bits overall) are allocated for network adressing and the rest is for: adressing the host on the network.
- Class A: first octet is network, last three: host
- Class B: first two octets are for network, last two: host
- Class C: first three octets are for network, only last octet is for host.
Furthermore, looking at the IP itself, you can tell which class of IP it is, using the following rules:
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
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
# Atom Editor's Must-Have Plugins | |
- AsciiDoc Preview | |
- hard-wrap | |
- Hey Pane | |
- Wordcount |
- Convert JSON to Go struct https://mholt.github.io/json-to-go/
- Structured Logger for Go https://github.com/sirupsen/logrus
- Fast and convenient HTTP Routing framework - Gin-Gonic https://github.com/gin-gonic/gin
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 url = "http://cdn1.giltcdn.com/images/share/uploads/0000/0001/7250/172502872/420x560.jpg"; | |
var encoded = new Buffer(url).toString('base64'); | |
var decoded = new Buffer(encoded, 'base64').toString('ascii') | |
console.log(encoded); | |
console.log(decoded); |
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 | |
## Node.js App Launcher | |
## Usage: ./nodedaemon.sh /home/apps/projectname/app.js | |
## Baesed on: http://pastebin.com/wNJNkbjg | |
# name=`basename $1` # For when/if we want to use scriptname | |
name=`dirname $1 | xargs -0 basename` # When/if we want to use last folder name as project name | |
cd `dirname $1` |
NewerOlder