In this workshop, you will learn how to build a full-stack Whiskey-voting application using LoopBack and AngularJS.
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
[{"name":"speak","phrase":"Thanks for calling!"}, | |
{"name":"playback","filename":"lots-o-monkeys"}] |
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 phoneNumber = '08111111'; //nomor yang akan di test | |
$.each(operators, function(service, operator) { | |
//console.log("%o : %o ", service, operator); | |
if (operator["pattern"].test(phoneNumber)) { | |
//do some thing with here or simple alert (for testing) | |
alert("%s iku cocok karo: $s -> jeneng produk'e: $s soko operator %s", phoneNumber, operator["pattern"], service, operator["name"]); | |
else | |
console.log("%s iku gak cocok: $o", phoneNumber, operator); | |
} |
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. removing the deb package: apt-get remove strongloop-suite | |
2. installing the new one: | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get update | |
apt-get install nodejs | |
npm install -g strong-cli |
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
Generating CSR | |
============== | |
openssl genrsa -des3 -out server.key 2048 | |
openssl rsa -in server.key -out server.key.insecure | |
mv server.key server.key.secure | |
mv server.key.insecure server.key | |
openssl req -new -key server.key -out server.csr | |
install on apache | |
================ |
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
npm config set registry http://registry.npmjs.org/ |
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
Should also work for: | |
[v] any OpenSSH installation | |
Given, your key is in id_rsa | |
1 | |
Passphrase is needed? | |
Try some host which has your public key (id_rsa.pub) |
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
eval `ssh-agent -s` |
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
Backing up your server (MongoDB) to the cloud | |
Submitted by admin on Wed, 01/02/2013 - 19:59 | |
In my previous blog post I detailed how to set-up a new server to host a small Play2 application securely using Nginx and MongoDB. | |
Now our application is up and running the next step is to configure backups. Alot of marketing suggests that cloud based VPS/Servers are a golden bullet with massive uptime, no worries of data loss, scalability etc etc. With the configuration I detailed previously we are using a single server on Rackspace's cloud service. Our server instance, and as is often the case is hosted on a single physical machine with no redundancy. This means if the physical host hosting our virtualised server goes down unexpectedly we can potentially loose all out data. This does happen, although not frequently I have had a Rackspace cloud server go down, luckily it was migrated to a new machine with no dataloss within 3 hours but if the issues was with the hosts drives this could of been different. | |
Some provider |
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
//click all friends link | |
var allFriends = document.getElementsByClassName('_5tef'); | |
for(var i=0; i<allFriends.length;i++) { | |
allFriends[i].click(); | |
console.log("allFriends link clicked!"); | |
} | |
//scroll down every seconds | |
var showAll = setInterval(function() { | |
var objDiv = document.getElementsByClassName('_5tee'); |
OlderNewer