Skip to content

Instantly share code, notes, and snippets.

View gillchristian's full-sized avatar
🦀
i use rust btw

Christian Gill gillchristian

🦀
i use rust btw
View GitHub Profile
@gillchristian
gillchristian / nginx-balancer-caching.js
Last active March 15, 2020 20:37 — forked from learncodeacademy/gist:ebba574fc3f438c851ae
Nginx Node Frontend / Load Balancer / Static Assets Caching [devops, example]
upstream project {
server 22.22.22.2:3000;
server 22.22.22.3:3000;
server 22.22.22.5:3000;
}
server {
listen 80;
location / {
@gillchristian
gillchristian / Caddyfile
Last active March 15, 2020 20:41
[devops]
gillchristian.xyz {
# projects
proxy /projects/go-api localhost:8998 {
without /projects/go-api
}
# git-workshop
proxy /git-workshop localhost:8997 {
without /git-workshop
}
@gillchristian
gillchristian / install_steam_and_aoe
Last active March 15, 2020 20:47 — forked from vespakoen/install_steam
install steam & age of empires 2 HD on ubuntu 14.04 [linux, tool]
# install wine 1.8
add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.8
# download steam
curl -o ~/Downloads/SteamSetup.exe http://media.steampowered.com/client/installer/SteamSetup.exe
# install some tricks
winetricks vcrun2010
@gillchristian
gillchristian / gc.js
Last active March 15, 2020 20:52
[example]
const windowSize = 200000
const msgCount = 1000000
let worst = -Infinity
function mkMessage(n) {
const m = []
for (let i; i < 2014; i++) {
m.push(n)
}
return m
@gillchristian
gillchristian / combinators.js
Last active March 15, 2020 20:52 — forked from Avaq/combinators.js
Common combinators in JavaScript [fp]
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@gillchristian
gillchristian / challenge-environment.js
Last active June 5, 2018 20:51
Minify challenge from AmsterdamJS Conf 2018
// --- challenge
const chalk = require('chalk')
const input = [
['bc: #0f0;', 'bc: rgb(0,255,0);'],
['bc: #ff00ff;', 'bc: rgb(255,0,255);'],
['bc: #000;', 'bc: rgb(0,0,0);'],
['bc: #000000;', 'bc: rgb(0,0,0);'],
['bc: #000000; // before fff000', 'bc: rgb(0,0,0); // before fff000'],
['bc: #FF00FF;', 'bc: rgb(255,0,255);'],
@gillchristian
gillchristian / install-popcorn-time.sh
Last active April 24, 2020 09:04
Install Popcorn Time on Ubuntu 18.04 [tool, ubuntu]
#!/usr/bin/env bash
# this script installs Popcorn Time following the instructions found in
# https://linuxconfig.org/how-to-install-popcorn-time-movie-player-on-ubuntu-18-04-bionic-beaver-linux
sudo apt update
sudo apt install libcanberra-gtk-module libgconf-2-4
sudo mkdir /opt/popcorn-time
gst: aliased to git status
gdiff () {
git diff --color $@ | diff-so-fancy
}
ga: aliased to git add
gc: aliased to git commit -v
@gillchristian
gillchristian / code-reviews-comments-reference.md
Last active May 20, 2021 14:04
[guide, essay, cheat-sheet]

Code Reviews Comments Convention

A convention to clarify the intention of a comment in a Pull Request (PR) code review using prefixes.

Although it is possible to express the intent in the way the comment is written, it is easier to do so with a simple prefix. Not only it requires less words but it is also easier to take a quick look at the comments and understand what is the intention/meaning of each one.

Only reviews that include [req] and/or [q] should reject the PR. In other cases just make the review a Comment or Approve.

Prefixes