Interactively create a package.json file and create Gruntfile.js file
npm init
npm install grunt --save-dev
npm install <LIBRARY> --save-dev
Setup package manager
lsof -i -n -P | grep TCP |
# lists/enumarates all angular application module | |
var allModules = angular.module('myApplication').requires; | |
# lists/enumarates all angular module service/controller/directive ... | |
angular.module('myApplication')['_invokeQueue'].forEach(function(value) { | |
console.log(value[1] + ": " + value[2][0]); | |
}); |
cd redux-timeout/ | |
# lists all remotes | |
git remote -v | |
# add another remote (SSH) | |
git remote add gpfunk git@github.com:gpfunk/redux-timeout.git | |
git remote -v | |
git fetch -p |
git clone https://github.com/openwebnet/openwebnet-site.git | |
cd openwebnet-site/ | |
mkdir dist | |
cd dist | |
echo "Hello World" > index.html | |
echo "openwebnet.xyz" > CNAME | |
cat index.html | |
cat CNAME | |
cd .. | |
git add . |
npm install -g npm-check-updates | |
npm-check-updates -u | |
npm install |
cd openwebnet-android | |
# lists all remotes | |
git remote -v | |
# add my remote to your repo (SSH) | |
git remote add niqdev git@github.com:openwebnet/openwebnet-android.git | |
# verify | |
git remote -v |
#!/bin/bash | |
for i in $(git branch -r | grep -vE "HEAD|master"); do | |
git branch --track ${i#*/} $i; done |
// https://projecteuler.net/problem=8 | |
// ---------- LargestProduct.scala ---------- | |
import scala.annotation.tailrec | |
object LargestProduct { | |
def solution(s: String, magnitude: Int): Long = { | |
def charToLong(c: Char): Long = c.toLong - 48L |
Install Play
wget https://downloads.typesafe.com/typesafe-activator/1.3.12/typesafe-activator-1.3.12-minimal.zip -P Downloads/
unzip Downloads/typesafe-activator-1.3.12-minimal.zip -d ~/opt/typesafe
# add to PATH
vim .bashrc
export ACTIVATOR='~/opt/typesafe/activator-1.3.12-minimal/'
export PATH=$PATH:$ACTIVATOR/bin
source .bashrc