Skip to content

Instantly share code, notes, and snippets.

View hnq90's full-sized avatar
🥑

Huy Nguyen Quang hnq90

🥑
View GitHub Profile
@prologic
prologic / LearnGoIn5mins.md
Last active June 20, 2024 04:04
Learn Go in ~5mins

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@jbesw
jbesw / index.js
Last active March 24, 2023 07:07
Language translation with S3 and AWS Translate
/*
MIT No Attribution
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
@katopz
katopz / setup-zeromq.sh
Last active August 10, 2021 21:47 — forked from cdjhlee/zeromq_install.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency
@hnq90
hnq90 / YubinBango.js
Last active August 30, 2017 07:35
ES6 YubinBango
/**
* 郵便番号自動入力クラス
* YubinBango
*
* [SOURCE]
* https://github.com/kobabasu/micro-flux
*
* [LATEST VERSION]
* https://gist.github.com/hnq90/1c63e82377b5cac9ec0ed7a1d93269d2
*

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@yoren
yoren / functions.php
Created October 25, 2016 09:23
Get terms by custom post types and taxonomy
<?php
/**
* my_terms_clauses
*
* filter the terms clauses
*
* @param $clauses array
* @param $taxonomy string
* @param $args array
@yoren
yoren / 1fix-switch-theme-on-certain-pages.php
Created August 10, 2016 08:27
WordPress tiny plugin - Switch theme on certain pages
<?php
/**
* @package One_Fix_Switch_Theme
* @version 1.0
*/
/*
Plugin Name: One Fix Switch Theme
Plugin URI: https://www.1fix.io
Description: Switch theme on certain pages.
Author: Yoren Chang