Skip to content

Instantly share code, notes, and snippets.

View arifsetyawan's full-sized avatar

Arif Setyawan arifsetyawan

View GitHub Profile
@arifsetyawan
arifsetyawan / nginx.conf
Created November 27, 2012 15:45
Nginx configuration file for PHP-FPM and fuel-php
master_process on;
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
worker_priority 0;
worker_rlimit_nofile 8192;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
# kudos to https://github.com/drewlesueur
# stolen from here: https://github.com/blog/266-fast-forward-your-fork#comment-11535
git checkout -b upstream/master
git remote add upstream git://github.com/documentcloud/underscore.git
git pull upstream master
git checkout master // [my master branch]
git merge upstream/master
git push origin master
server {
listen 80;
server_name www.example.com;
root /var/www/vhosts/example.com/public/;
location /
{
index index.php index.html index.htm;
}
@arifsetyawan
arifsetyawan / api.tags.php
Last active December 16, 2015 04:19
The Bootstrap Tags Manager Server Side API (code in laravel)
<?php
/**
* This class is the extensible controller class in laravel
* @author arifsetyawan me@arifsetyawan.com
* @since 3
*/
class Api_Tags_Controller extends Admin_Controller{
/**
$(document).ready(function() {
$('#map_canvas').googleMaps({
scroll: false,
latitude: 40.81098,
longitude: -73.92786,
depth: 15,
markers: {
latitude: 40.81150,
longitude: -73.92782,
icon: {
server {
listen 80;
listen 443 ssl;
server_name maxtelindo.com;
root "/home/arif/maxtelindo/public";
index index.html index.htm index.php;
charset utf-8;
@arifsetyawan
arifsetyawan / MainActivity.java
Last active August 28, 2016 08:41
android_bekup_sample_5
package com.arifsetyawan.myapplication;
import android.app.Activity;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
@arifsetyawan
arifsetyawan / serverless.yml
Created January 15, 2018 16:13 — forked from jscattergood/serverless.yml
Creating a custom serverless resource for subscribing to SNS topics in another region
# Welcome to Serverless!
#
# Happy Coding!
service: cross-region-sns-subscriber
# Keep environment specific configurations in separate files
custom: ${file(config/${env:STAGE}.json)}
provider:
@arifsetyawan
arifsetyawan / jsonmarshalunmarshal.go
Created December 29, 2019 07:44
Json Marshal and Unmarshal
type User struct {
firstName string `json:"first_name"`
lastName string `json:"last_name"`
}
userObj = User{
firstName: "Arif",
lastName: "Setyawan"
}