Skip to content

Instantly share code, notes, and snippets.

View hienduyph's full-sized avatar
🎯
Just give me a reason

Hien PHAM hienduyph

🎯
Just give me a reason
View GitHub Profile
@hienduyph
hienduyph / πŸ“Š Weekly development breakdown
Last active April 5, 2020 06:10
πŸ“Š Weekly development breakdown
Markdown 2 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 33.2%
Rust 2 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‰β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 33.0%
YAML 1 min β–ˆβ–ˆβ–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 20.8%
TypeScript 0 secs β–ˆβ–ˆβ–Žβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 10.8%
Git Config 0 secs ▍░░░░░░░░░░░░░░░░░░░░ 2.2%
@hienduyph
hienduyph / gist:de0729f4955ded59674832d1dce84439
Created January 8, 2019 00:29 — forked from jaseg/gist:ef83d89b39ae69fad07a
Doing 3D projection in a few lines of python to render a rotating tetraeder to SVG
#!/usr/bin/env python3
import numpy as np
from math import sin, cos, pi, sqrt
import svgwrite
import itertools
def cam(f):
""" Returns a camera matrix for the given focal length """
return np.array(((1,0,0,0),
(0,1,0,0),
@hienduyph
hienduyph / .vimrc
Created July 8, 2018 08:24 — forked from imxiaobo/.vimrc
My .vimrc configuration. Plugins are managed by vundle.vim.
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
@hienduyph
hienduyph / nginx.conf
Created June 26, 2018 12:49 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@hienduyph
hienduyph / service-workers.md
Created April 3, 2018 14:41 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@hienduyph
hienduyph / gist:38c66c4891e55fc7e51cf9f117c00dec
Created March 4, 2018 00:34 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@hienduyph
hienduyph / keys.go
Created February 9, 2018 00:41 — forked from sdorra/keys.go
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@hienduyph
hienduyph / gist:dce03f1ac7be2078f8fb919214745e0e
Created January 25, 2018 05:22 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.