Skip to content

Instantly share code, notes, and snippets.

View nyancodeid's full-sized avatar
❤️
Do what you love, love what you do

Ryan Aunur Rassyid nyancodeid

❤️
Do what you love, love what you do
View GitHub Profile
@nyancodeid
nyancodeid / README.md
Last active May 4, 2024 05:41
Make RESTful API with Google Apps Script and SpreadSheet

Google Script CRUD

By Ryan Aunur Rassyid

Simply create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.

@nyancodeid
nyancodeid / commit-message-id.md
Last active April 28, 2024 14:49
Commit Message Guidelines

Pedoman Commit Message

Kami memiliki aturan yang sangat tepat tentang bagaimana pesan git commit kami dapat diformat. Ini mengarah ke pesan yang lebih mudah dibaca yang mudah diikuti ketika melihat melalui history proyek. Dan juga, kami menggunakan pesan git commit untuk menghasilkan log perubahan pada Angular.

Format Commit Message

Setiap pesan komit terdiri dari header, konten, dan catatan kaki. Judul memiliki format khusus yang mencakup jenis, cakupan, dan subjek:

<type>(<scope>): <subject>
<BLANK LINE>
@nyancodeid
nyancodeid / index.ts
Created April 6, 2024 20:59
Browser: Turn Uint8Array into ImageData
function bufferIntoImageData (data: Uint8Array): Promise<ImageData> {
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d', {
willReadFrequently: true
});
if (!context) {
throw new Error('Canvas context is not available.');
}
@nyancodeid
nyancodeid / README.md
Created December 27, 2020 11:18
Laravel 8 - Localization Indonesian Language

Laravel 8 - Localization Indonesian Language

Laravel 8 localization file untuk bahasa indonesia.

Put this file into your laravel project with following path: Letakkan file ini di laravel project kamu di folder berikut:

./resources/lang/id/{filename}.php

To make it as a default language and english as a fallback, set locale attribute value inside of ./config/app.php file to be id. Untuk menjadikan bahasa indonesia sebagai bahasa utama dan bahasa inggris sebagai alternatif, maka set nilai atribut locale pada file ./config/app.php menjadi id

@nyancodeid
nyancodeid / example-result.json
Created July 11, 2018 05:17
Parse Nomor Induk Kependudukan (NIK) dengan Javascript
{
"nik": "XXXXXXXXXXXXXXXX",
"wilayah": {
"provinsi": "XX",
"kota": "XX",
"kabupaten": "XX",
"kecamatan": "XX"
},
"tanggal": {
"hari": "XX",
@nyancodeid
nyancodeid / parse.js
Last active January 10, 2023 15:01
Prefix Provider Indonesia in Javascript
function parseOperator(phone) {
var OperatorPrefix = {
telkomsel: ["0812","0813","0821","0822","0852","0853","0823","0851"],
indosat: ["0814","0815","0816","0855","0856","0857","0858"],
tri: ["0895","0896","0897","0898","0899"],
smartfren: ["0881","0882","0883","0884","0885","0886","0887","0888","0889"],
xl: ["0817","0818","0819","0859","0877","0878"],
axis: ["0838","0831","0832","0833"],
bolt: ["0999", "0998"]
}
@nyancodeid
nyancodeid / schema.graphql
Created December 9, 2021 15:56
DenoQL: GraphQL Schema
type Query {
page(
# A URL to fetch the HTML source from.
url: String
# A string containing HTML to be used as the source document.
source: String
): Document
}
@nyancodeid
nyancodeid / README.md
Last active December 17, 2021 10:47
DenoQL Showcase
@nyancodeid
nyancodeid / BubbleSortTest.java
Last active November 12, 2021 03:04
Benchmark Test Sorting Algorithm
public class BubbleSortTest {
public static void main(String[] args) {
long waktuMulai = 0;
long waktuSelesai = 0;
int[] iniDataSebelumDiurut;
// Test untuk 1.000 data
waktuMulai = System.currentTimeMillis();
@nyancodeid
nyancodeid / README.md
Created July 19, 2021 13:05
Fetch With Progress

Fetch with Progress (XMLHttpRequest Implementation)

/**
 *
 * @param {String} url
 * @param opts
 * @param {Function} onProgress
 * @returns {Promise<String>}
 */