Skip to content

Instantly share code, notes, and snippets.

View clementohNZ's full-sized avatar
:octocat:
Building things.

Clement Oh clementohNZ

:octocat:
Building things.
  • Singapore
  • 18:26 (UTC +08:00)
  • X @0xclem
View GitHub Profile
@clementohNZ
clementohNZ / .eslintrc
Created September 9, 2017 22:42
JS Configs
{
"extends": "eslint:recommended",
"rules": {
"block-scoped-var": ["warn", "always"],
"class-methods-use-this": ["warn", "always"],
"default-case": ["warn", "always"],
"eqeqeq": ["warn", "always"],
"no-alert": ["error", "always"],
"no-empty-function": ["error", "always"],
"no-eq-null": ["error", "always"],
@clementohNZ
clementohNZ / concourse.md
Created July 12, 2018 22:29 — forked from kevin-smets/concourse.md
Setup the Concourse binary locally on macOS and run the hello world example.

Prerequisites

Installs

Concourse

curl -Lo concourse https://github.com/concourse/concourse/releases/download/v2.5.0/concourse_darwin_amd64 && chmod +x concourse && mv concourse /usr/local/bin
@clementohNZ
clementohNZ / clean_code.md
Created January 24, 2019 15:57 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

class Car {
constructor() {
this.distance = 0;
}
move() {
this.distance += 1;
console.log(`current distance is: ${this.distance}`);
}
}
@clementohNZ
clementohNZ / gist:95cd78e63d18f408a052c683bdbe788a
Created July 19, 2020 12:56 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@clementohNZ
clementohNZ / install.sh
Last active August 10, 2020 11:07
Install Jetbrains Toolbox Ubuntu
# Original Credit: https://www.youtube.com/watch?v=cFbQnJNmt-8
# Now automated in one script
# Install Toolbox Dependencies
sudo apt install fuse
sudo modprobe fuse
sudo groupadd fuse
user="$(whoami)"
sudo usermod -a -G fuse $user