Skip to content

Instantly share code, notes, and snippets.

View fnzainal's full-sized avatar
🏠
Working from home

Zainal Fahrudin fnzainal

🏠
Working from home
View GitHub Profile
[
{
"id": "11",
"name": "ACEH",
"alt_name": "ACEH",
"latitude": 4.36855,
"longitude": 97.0253
},
{
"id": "12",
@fnzainal
fnzainal / BaseFragment.kt
Last active September 23, 2021 12:29
Dummy Data Generator Kotlin
abstract class BaseFragment : Fragment(){
fun generateDummy(): List<Contact> {
val list = mutableListOf<Contact>()
for (i in 0 until 10){
list.add(
Contact(
getRandomString()+" "+getRandomString(),
getRandomString(),
"+62"+getRandomNumber(),
@fnzainal
fnzainal / README.md
Created March 19, 2021 04:02 — forked from richardblondet/README.md
Create a restful API with Google App Script CRUD and a Spreadsheet

Google App Script CRUD

Inspired by this gist.

Getting Started

  1. Create a new App Script project.
  2. Paste the content of the file google-app-script-crud.gs in the default Code.gs file.
  3. Create a new Spreadsheet.
  4. Copy the Spreadsheet ID found in the URL into the variable SHEET_ID located in line 1 of your file.
@fnzainal
fnzainal / Privacy Policy.md
Last active May 5, 2019 00:53
Currency Converter app

Privacy Policy

Khoiru Code built the Currency Converter app as an Ad Supported app. This SERVICE is provided by Khoiru Code at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Currency Converter unless otherwise defined in this Privacy Policy.

@fnzainal
fnzainal / gist:6a58ca5c4d53cedeb75a697911370d17
Created October 27, 2017 03:17 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@fnzainal
fnzainal / DateFormatAndroid.md
Last active September 29, 2017 02:26
formating date time on android
DateFormat df = new SimpleDateFormat("EEE, d MMM yyyy, HH:mm");
String date = df.format(Calendar.getInstance().getTime());

Format ---- output

"yyyy.MM.dd G 'at' HH:mm:ss z" ---- 2001.07.04 AD at 12:08:56 PDT
"hh 'o''clock' a, zzzz" ----------- 12 o'clock PM, Pacific Daylight Time
@fnzainal
fnzainal / 51-android.rules
Created September 26, 2017 14:07 — forked from jdamcd/51-android.rules
Full set of Android USB vendor ID rules for Linux
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" #Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev" #ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev" #Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev" #Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev" #Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" #Google
SUBSYSTEM=="usb", ATTR{idVendor}=="201E", MODE="0666", GROUP="plugdev" #Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev" #Hisense
@fnzainal
fnzainal / RxJavaExamples.java
Created August 21, 2017 14:32 — forked from ariesmcrae/RxJavaExamples.java
RxJava examples using Java 8 Lambda. Examples include zip, map, take, filter, reduce
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import rx.Observable;
import rx.Observer;
import rx.functions.Func2;
public class RxJavaExamples {
package com.rohmanhakim.androidreactivedemo;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
@fnzainal
fnzainal / TransitionFragment.java
Last active July 20, 2017 04:19
to create transition fragment
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;