Skip to content

Instantly share code, notes, and snippets.

View ariefitriadin's full-sized avatar
🎯
Cloud , Microservices, Go, Kotlin

Arie Fitriadin ariefitriadin

🎯
Cloud , Microservices, Go, Kotlin
  • Jakarta, Indonesia
View GitHub Profile
let strObj = '[{50:4945},{51:4945},{52:4945},{56:4945},{57:4945},{66:4945},{71:4945},{73:4945},{93:4945}]';
eval('var arrObj='+strObj);
//get value by key
let ts = arrObj.filter(obj => obj[51])[0][51];
@ariefitriadin
ariefitriadin / git pull rebase.md
Last active October 22, 2020 07:21
Git Pull Rebase

To Get Update from git branch that use silmutaneously with your teammate use:

branch name: feature/1

currently your local feature/1 branch contain your local commits that not push to origin yet, but somehow you want get update from your team that use the same branch, to be not overlapping git gommit id in the git history between your commit and your teamate commit you can do this in your local branch :

import 'dart:async';
class Cake {}
class Order {
String type;
Order(this.type);
}
void main() {
@ariefitriadin
ariefitriadin / DockerCleanupResources.md
Last active June 23, 2019 00:27
Cleanup Unused Resources Networks, Containers, Images, cache

Remove Docker Images

docker rmi $(docker images --filter "dangling=true" -q --no-trunc)

Remove Docker Network

docker network prune
@ariefitriadin
ariefitriadin / play_with_array.js
Last active August 24, 2017 04:43
Some Array Works
/* Example Array Of Objects : */
let anymalgroups = [
{nama:"kambing", jenis: "mamalia"},
{nama:"kerbau", jenis: "mamalia"},
{nama:"bebek", jenis: "unggas"},
{nama:"ayam", jenis: "unggas"}
]
/* Count Per Jenis using Array.reduce in es2015 style */