Skip to content

Instantly share code, notes, and snippets.

View andhikayuana's full-sized avatar
🌏
bertapa

Andhika Yuana andhikayuana

🌏
bertapa
View GitHub Profile
@andhikayuana
andhikayuana / Makefile
Created January 16, 2019 07:02 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
@andhikayuana
andhikayuana / script2.js
Created December 27, 2018 08:58
postman collection runner article
var random = Math.floor(Math.random() * 100000000);
pm.globals.set("user_phone", "+628681"+random);
pm.globals.set("user_email", "u"+random+"@jarjit.com");
pm.globals.set("user_fullname", "u"+random+" jarjit ");
pm.globals.set("user_gender", Math.random() < 0.5 ? "male" : "female");
pm.globals.set("user_dob", "1990-01-01");
pm.globals.set("user_is_public", true);
pm.globals.set("user_description", "hello "+random);
@andhikayuana
andhikayuana / script1.js
Last active December 27, 2018 08:57
postman collection runner article
pm.globals.get("variable_key"); //untuk mengambil variabel global
pm.variables.get("variable_key"); //mengambil variabel lokal
pm.environment.set("variable_key", "variable_value"); //setting environment variabel
pm.globals.set("variable_key", "variable_value"); //setting variabel global
pm.environment.unset("variable_key"); //hapus environment variabel
pm.globals.unset("variable_key"); //hapus variabel global
// melakukan request ke suatu API
pm.sendRequest("https://postman-echo.com/get", function (err, response) {
console.log(response.json());
@andhikayuana
andhikayuana / RestrictedSocketFactory.java
Created December 17, 2018 06:10 — forked from slightfoot/RestrictedSocketFactory.java
Fix for upload progress monitoring in Android.
import android.util.Log;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;
import javax.net.SocketFactory;
Install Ruby Gems on Mac OS X without sudo
1. Add GEM_HOME to your .bash_profile
For example, nano ~/.bash_profile and add
export GEM_HOME=/Users/srinivas/.gem where the path is to your own Home folder
2. Add the gem executables to your system path
Also in .bash_profile, add
@andhikayuana
andhikayuana / sphp.sh
Created November 5, 2018 04:37 — forked from rhukster/sphp.sh
#!/bin/bash
# Creator: Phil Cook
# Email: [email protected]
# Twitter: @p_cook
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
brew_array=("5.6","7.0","7.1","7.2")
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]")
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]")
php_installed_array=()
@andhikayuana
andhikayuana / readme.md
Created October 12, 2018 13:14
install tomcat on mojave
@andhikayuana
andhikayuana / rules.pro
Created October 12, 2018 05:48 — forked from aegis123/rules.pro
ProGuard and DexGuard rules
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
#your package path where your gson models are stored
-keep class com.project.models.** { *; }
@andhikayuana
andhikayuana / readme.md
Created October 5, 2018 10:41
Install ntfs-3g macos

Install ntfs-3g in macOS

  • Homebrew Required!
  • When enable/disable csrutil you must restart!
$ brew cask install osxfuse
$ brew install ntfs-3g
$ csrutil disable
$ csrutil status
@andhikayuana
andhikayuana / DebouncedOnClickListener.java
Created September 18, 2018 08:21 — forked from rfreedman/DebouncedOnClickListener.java
A debounced onClickListener for Android
import android.os.SystemClock;
import android.view.View;
import java.util.Map;
import java.util.WeakHashMap;
/**
* A Debounced OnClickListener
* Rejects clicks that are too close together in time.
* This class is safe to use as an OnClickListener for multiple views, and will debounce each one separately.