Skip to content

Instantly share code, notes, and snippets.

View agungf's full-sized avatar

Agung Firdaus agungf

  • Jakarta, Indonesia
View GitHub Profile
[{"name":"speak","phrase":"Thanks for calling!"},
{"name":"playback","filename":"lots-o-monkeys"}]
@agungf
agungf / cara akses pakai jquery
Created January 21, 2012 06:55
indonesia operators regex
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);
}
@agungf
agungf / strongloop re-install
Created December 16, 2013 09:20
unistalling strongloop deb package from rackspace server and installing the new version
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
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
================
@agungf
agungf / gist:8803505
Created February 4, 2014 13:25
installing from npm fails registry url error
npm config set registry http://registry.npmjs.org/
@agungf
agungf / gist:8803512
Created February 4, 2014 13:25
Remove passphrase (password) from private RSA key
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)
@agungf
agungf / gist:8803522
Created February 4, 2014 13:26
Could not open a connection to your authentication agent
eval `ssh-agent -s`
@agungf
agungf / backing up mongodb to rackspace file
Created February 7, 2014 04:50
backing up mongodb to rackspace file
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
@agungf
agungf / FB panpage auto invite
Last active August 29, 2015 14:07
FB panpage auto invite
//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');
@agungf
agungf / Instructions.md
Last active August 29, 2015 14:09 — forked from bajtos/notice.md

Build a full-stack application with LoopBack and AngularJS

LoopBack logo AngularJS logo

In this workshop, you will learn how to build a full-stack Whiskey-voting application using LoopBack and AngularJS.