Skip to content

Instantly share code, notes, and snippets.

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

andrew ananta anztrax

🏠
Working from home
View GitHub Profile
@anztrax
anztrax / input
Created November 4, 2021 10:38
flat list to tree
[
{
parentId: -1,
id: 1,
value: 200
},
{
parentId: -1,
id: 2,
value: 300
@anztrax
anztrax / README.md
Last active July 26, 2021 10:44
UN population file 2019
@anztrax
anztrax / country_population.csv
Created July 3, 2021 04:36
country population
country population
China 1415046
India 1354052
United States 326767
Indonesia 266795
Brazil 210868
Pakistan 200814
Nigeria 195875
Bangladesh 166368
Russia 143965
@anztrax
anztrax / cssNamedColors.csv
Last active March 30, 2022 07:07
cssNamedColors
Specification Keyword RGB hex value
CSS Level 1 black #000000
CSS Level 1 silver #c0c0c0
CSS Level 1 gray #808080
CSS Level 1 white #ffffff
CSS Level 1 maroon #800000
CSS Level 1 red #ff0000
CSS Level 1 purple #800080
CSS Level 1 fuchsia #ff00ff
CSS Level 1 green #008000
@anztrax
anztrax / gist:1eb43a62cc0ba9fa6209dbdc352ad45d
Last active June 17, 2021 04:22
maria DB with nextJS API
import mariadb from 'mariadb';
const pool = mariadb.createPool({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: 'my_db',
connectionLimit: 5
});
console.log('is this called ?');
/**
* the value will be all 2 , but if you change into *let*. that will not be happend
**/
let callbacks = [];
for(var i=0;i < 2; i++){
callbacks.push(() => {
console.log(i);
});
};
package imagerenderer
import (
"github.com/ungerik/go-cairo"
"image"
_ "image/jpeg"
"net/http"
)
func _decodeBase64() image.Image{
@anztrax
anztrax / postgres-brew.md
Created August 7, 2017 08:39 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@anztrax
anztrax / TestMonacoEditorPage.js
Created April 7, 2017 22:12
just want to test the monaco editor
import React from 'react';
import Head from 'next/head';
import {stylesheet, classNames} from './index.css';
import ComponentA from './Component/ComponentA/ComponentA';
// import ComponentB from './Component/ComponentB/ComponentB';
export default class TestMonacoEditorPage extends React.Component{
constructor(props){
super(props);
this.state = {
@anztrax
anztrax / ASCIIDoc
Created November 26, 2015 15:33
Movie Demo
= Movie Demo
== Domain
This text is kept for Domain text
== Setup
The Sample data which creates Actors, Movies and their relationships
//hide
//setup