Skip to content

Instantly share code, notes, and snippets.

View arifsetiawan's full-sized avatar

arif setiawan arifsetiawan

View GitHub Profile
@arifsetiawan
arifsetiawan / kafka.md
Created April 10, 2016 10:44 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
@arifsetiawan
arifsetiawan / WebDriver_Mocha
Created February 11, 2016 14:54 — forked from patoi/WebDriver_Mocha
Selenium WebDriver JavaScript test with Mocha and NodeJS
/*
* Selenium WebDriver JavaScript test with Mocha and NodeJS
*
* Start with: SELENIUM=PATH_TO_SELENIUM_JAR/selenium-server-standalone-2.31.0.jar mocha -t 10000 -R list google-sample.js
*
* Download selenium-server-standalone-2.31.0.jar from https://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar
* 'sudo su' and 'npm install -g colors mocha selenium-webdriver'
*
* http://visionmedia.github.io/mocha/
* https://code.google.com/p/selenium/wiki/WebDriverJs
@arifsetiawan
arifsetiawan / install-comodo-ssl-cert-for-nginx.rst
Created December 7, 2015 07:30 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@arifsetiawan
arifsetiawan / pedantically_commented_playbook.yml
Last active August 29, 2015 14:27 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@arifsetiawan
arifsetiawan / console.xml
Created May 7, 2015 04:59
my console2 seting. copy to console2 folder
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="32" columns="120" buffer_rows="9999" buffer_columns="0" shell="" init_dir="E:\ArifSetiawan" start_hidden="0" save_size="0">
<colors>
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
@arifsetiawan
arifsetiawan / azurecamp-asynctask.java
Last active August 29, 2015 14:07
Simple Android AsyncTask
// execute("GET","url","Body")
private class ApiClient extends AsyncTask<String, Void, String> {
// This runs in other thread
@Override
protected String doInBackground(String... params) {
String method = params[0];
String url = params[1];
String body = params[2];
@arifsetiawan
arifsetiawan / azurecamp-deploynodeapp.md
Last active August 29, 2015 14:06
Deploy Node.js App
@arifsetiawan
arifsetiawan / azurecamp-workingwithcli.md
Last active October 24, 2017 11:29
Working with azure cli
var B = require("bluebird/js/main/promise")();
var Bproto = B.prototype;
var deferredPrototype = B.pending().constructor.prototype;
deferredPrototype.makeNodeResolver = function() {
return this.asCallback;
};
function bind(fn, ctx) {
@arifsetiawan
arifsetiawan / Acl.php
Created May 30, 2014 03:32
slim middleware
<?php
//
// Here, we define route and its auth requirements
function getAcl() {
$acls = array(
"/secret" => array("member"),
"/moresecret" => array("member","subscribe")
);