Skip to content

Instantly share code, notes, and snippets.

Agung Firdaus agungf

  • Jakarta, Indonesia
Block or report user

Report or block agungf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
agungf / dacast-snippet-web
Created Feb 27, 2017
Dacast player code snipper from web App
View dacast-snippet-web
_vid_player = dacast.players[_vid_id];
// console.log(;
console.log('player ready');
// console.log('Step 2');
// console.log('playing video');
agungf / dacast-snippet-android
Created Feb 27, 2017
Dacast player code snipper from Android App
View dacast-snippet-android
package com.ruangguru.livestudents.ui.onlinevideo;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
agungf / dacast-snippet-ios
Created Feb 27, 2017
Dacast player code snipper from IOS App
View dacast-snippet-ios
@IBOutlet weak var videoWebView: UIWebView!
videoWebView.allowsInlineMediaPlayback = false
videoWebView.mediaPlaybackRequiresUserAction = true
videoWebView.scrollView.scrollEnabled = false
let videoURLString = String(format:"%@/%@?file_id=%@&ip=%@&ua=%@", RGConstant.Services.URL.videoBaseURL, RGConstant.Services.URL.Path.videoPlayer, fileIDVideo, ipAdress,userAgent)
let videoURL = NSURL(string: videoURLString)
let request = NSMutableURLRequest(URL: videoURL!)
if let token = TokenManager.sharedManager.getToken() {
agungf /
Last active Aug 29, 2015 — forked from dypsilon/
View docker-cleanup
# Cleanup docker files: untagged containers and images.
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref:
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker -y
# Install fig
sudo sh -c "curl -L`uname -s`-`uname -m` > /usr/local/bin/fig"
sudo chmod +x /usr/local/bin/fig

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.

agungf / FB panpage auto invite
Last active Aug 29, 2015
FB panpage auto invite
View FB panpage auto invite
//click all friends link
var allFriends = document.getElementsByClassName('_5tef');
for(var i=0; i<allFriends.length;i++) {
console.log("allFriends link clicked!");
//scroll down every seconds
var showAll = setInterval(function() {
var objDiv = document.getElementsByClassName('_5tee');
agungf / backing up mongodb to rackspace file
Created Feb 7, 2014
backing up mongodb to rackspace file
View 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 / gist:8803522
Created Feb 4, 2014
Could not open a connection to your authentication agent
View gist:8803522
eval `ssh-agent -s`
You can’t perform that action at this time.