Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

andrew ananta anztrax

🏠
Working from home
View GitHub Profile
@anztrax
anztrax / input
Created Nov 4, 2021
flat list to tree
View input
[
{
parentId: -1,
id: 1,
value: 200
},
{
parentId: -1,
id: 2,
value: 300
@anztrax
anztrax / README.md
Last active Jul 26, 2021
UN population file 2019
View README.md
View country_population.csv
country population
China 1415046
India 1354052
United States 326767
Indonesia 266795
Brazil 210868
Pakistan 200814
Nigeria 195875
Bangladesh 166368
Russia 143965
View cssNamedColors.csv
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
View gist:1eb43a62cc0ba9fa6209dbdc352ad45d
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 ?');
View javascript var variable problem
/**
* 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);
});
};
View simple golang cairo example
package imagerenderer
import (
"github.com/ungerik/go-cairo"
"image"
_ "image/jpeg"
"net/http"
)
func _decodeBase64() image.Image{
@anztrax
anztrax / postgres-brew.md
Created Aug 7, 2017 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)
View postgres-brew.md

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 Apr 7, 2017
just want to test the monaco editor
View TestMonacoEditorPage.js
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 = {
View ASCIIDoc
= Movie Demo
== Domain
This text is kept for Domain text
== Setup
The Sample data which creates Actors, Movies and their relationships
//hide
//setup