Skip to content

Instantly share code, notes, and snippets.

View hiukky's full-sized avatar
🏝️
~ vacation, back soon!

R o m u l l o hiukky

🏝️
~ vacation, back soon!
View GitHub Profile
@hiukky
hiukky / README.md
Created June 1, 2022 19:14 — forked from danieldietrich/README.md
The easiest way to bundle a simple TypeScript web application

The easiest way to bundle a simple TypeScript web application

Packaging JavaScript applications can be a bit overwhelming. The popular project uglifyjs does not support ES6, it is cumbersome to configure the allmighty Webpack, bundlers like Parcel and Microbundle still have bugs or do not compile to ESM bundles that work in a browser. It is hard to figure out the best way to bundle an application.

Here I give a small example, how we achieve the goal using the

@hiukky
hiukky / mixin.ts
Created July 14, 2021 21:02 — forked from basarat/mixin.ts
export type Class = new (...args: any[]) => any;
export function DisposableMixin<Base extends Class>(base: Base) {
return class extends base {
isDisposed: boolean = false;
dispose() {
this.isDisposed = true;
}
};
}
@hiukky
hiukky / arch_installation.md
Created May 15, 2021 20:05 — forked from eltonvs/arch_installation.md
Arch Linux step to step installation guide

Arch Linux Installation Guide

This guide will show step-by-step how to Install Arch Linux on UEFI mode.

Table of Contents

  • Bootable Flash Drive
  • BIOS
  • Pre installation
    • Set Keyboard Layout
    • Check boot mode
  • Update System Clock
@hiukky
hiukky / primitive-reference-types-javascript.md
Created February 5, 2021 19:53 — forked from branneman/primitive-reference-types-javascript.md
Primitive Types & Reference Types in JavaScript

Primitive Types & Reference Types in JavaScript

An explanation of JavaScript's pass-by-value, which is unlike pass-by-reference from other languages.

Facts

  • JavaScript has 2 kinds of variable types: primitive and reference.
  • A fixed amount of memory is reserved after creation of every variable.
  • When a variable is copied, it's in-memory value is copied.
  • Passing a variable to a function via a call also creates a copy of that variable.

Primitive Types

@hiukky
hiukky / renew-gpgkey.md
Created January 19, 2021 17:31 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@hiukky
hiukky / rollup-typescript.md
Created January 9, 2021 22:00 — forked from aleclarson/rollup-typescript.md
The best Rollup config for TypeScript libraries

Please retweet if this helps you!

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

@hiukky
hiukky / i3-cheat-sheet.md
Created December 23, 2020 11:58 — forked from JeffPaine/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@hiukky
hiukky / docker-help.md
Created December 22, 2020 12:23 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@hiukky
hiukky / nginxproxy.md
Created December 13, 2020 15:58 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@hiukky
hiukky / postgres-cheatsheet.md
Created December 9, 2020 22:25 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)