Skip to content

Instantly share code, notes, and snippets.

View ntk148v's full-sized avatar
🏃‍♂️

Kien Nguyen-Tuan ntk148v

🏃‍♂️
View GitHub Profile
@ntk148v
ntk148v / main.go
Created March 7, 2019 02:33 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@ntk148v
ntk148v / main.go
Created March 7, 2019 02:33 — forked from creack/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"os/signal"
"strconv"
@ntk148v
ntk148v / System Design.md
Created February 22, 2019 06:48 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
http://cronus.allowed.org works for me, 2018.1.6
@ntk148v
ntk148v / installing-arch.md
Created July 10, 2018 08:38 — forked from ChrisTimperley/installing-arch.md
Instructions for installing Arch Linux and i3 onto a Dell Inspiron 7537

Arch Linux

GRUB Installation

Be sure to replace /dev/sda with the name of the drive (n.b. not the partition) containing Arch.

# pacman -S grub-bios intel-ucode
# grub-install /dev/sda
# mkinitcpio -p linux
@ntk148v
ntk148v / xxf.zsh-theme
Created May 6, 2018 02:57 — forked from xfanwu/xxf.zsh-theme
Yet another theme for oh-my-zsh
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
# http://xiaofan.at
# 2 Jul 2015 - Xiaofan
# Machine name.
function box_name {
@ntk148v
ntk148v / myappindicator_v5.py
Created December 10, 2017 04:23 — forked from jmarroyave/myappindicator_v5.py
Ubuntu AppIndicator to show Chuck Norris jokes - Updated to python 3
# This code is an example for a tutorial on Ubuntu Unity/Gnome AppIndicators:
# http://candidtim.github.io/appindicator/2014/09/13/ubuntu-appindicator-step-by-step.html
import os
import signal
import json
from urllib import request
from urllib.error import URLError
from urllib.request import urlopen
@ntk148v
ntk148v / container.diff
Last active September 5, 2017 07:33 — forked from anonymous/-
diff --git a/barbican/api/controllers/acls.py b/barbican/api/controllers/acls.py
index d65f87a..a586590 100644
--- a/barbican/api/controllers/acls.py
+++ b/barbican/api/controllers/acls.py
@@ -22,6 +22,7 @@ from barbican.common import validators
from barbican import i18n as u
from barbican.model import models
from barbican.model import repositories as repo
+from barbican import objects
@ntk148v
ntk148v / 00-MapSideJoinDistCacheTextFile
Created June 12, 2017 16:14 — forked from airawat/00-MapSideJoinDistCacheTextFile
Map-side join example - Java code for joining two datasets - one large (tsv format), and one with lookup data (text), made available through DistributedCache
This gist demonstrates how to do a map-side join, loading one small dataset from DistributedCache into a HashMap
in memory, and joining with a larger dataset.
Includes:
---------
1. Input data and script download
2. Dataset structure review
3. Expected results
4. Mapper code
5. Driver code
@ntk148v
ntk148v / local.conf
Last active June 2, 2017 02:46 — forked from toanalien/local.conf
local.conf for devstack stable/mitaka
[[local|localrc]]
# Modify to your environment
#FIXED_RANGE=10.0.0.0/24
#FLOATING_RANGE=192.168.1.224/27
#PUBLIC_NETWORK_GATEWAY=192.168.1.225
#PUBLIC_INTERFACE=em1
#PHYSICAL_NETWORK=public
#OVS_PHYSICAL_BRIDGE=br-ex
#HOST_IP=104.199.204.70