Skip to content

Instantly share code, notes, and snippets.

uhop / nginx-webp-sample.conf
Last active May 25, 2024 17:02
Serving WEBP with nginx conditionally.
user www-data;
http {
# Basic Settings
sendfile on;
tcp_nopush on;
uhop / static-server.mjs
Last active May 11, 2024 01:05
No-dependency ES6 drop-in modular static development HTTP server.
// License: BSD-3
// (c) 2023 Eugene Lazutkin
import http from 'node:http';
import fs from 'node:fs';
import path from 'node:path';
const fsp = fs.promises;
uhop /
Created March 23, 2024 05:28 — forked from thomd/

alternatively use:


The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.

The color designators are as follows:

a black

uhop /
Created March 22, 2024 18:22 — forked from izabera/
tput codes

This is the table from man 5 terminfo.

Do NOT hardcode terminal escape sequences. Use tput with the cap-names from the table below to get the right code for your terminal.

(P) indicates that padding may be specified
uhop / .bash_aliases
Created July 3, 2016 20:19
My bash setup
# commands from
#alias chmod='command chmod -c'
alias cpr='command cp -rpv'
alias df='command df -kh'
alias df1='command df -ia'
alias diff='diff -up'
alias dsiz='du -sk * | sort -n --'
alias du='command du -kh'
alias du1='echo *|tr " " "n" |xargs -iFF command du -hs FF|sort'
uhop / Evolution of a Python
Created November 21, 2010 20:13
Evolution of a Python programmer
#Newbie programmer
def factorial(x):
if x == 0:
return 1
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
uhop / gist:3259255
Created August 4, 2012 18:41
Bezier Shaders & Vector openGL rendering
uhop /
Created July 3, 2023 19:01 — forked from fnky/
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
uhop / README
Created May 29, 2023 06:35 — forked from radfish/README
Route only Transmission through a VPN connection using your own VPN server
# The approach is to mark packets from a specific user,
# create a dedicated routing table with a default route
# through the VPN, and force all marked packets to be
# routed using that table.
# Sources:
# In this guide
// Copied from under BSD-3 and slightly modified.
// create.js
// Dojo-inspired set of DOM utilities
export const namespaces = {
svg: '',
xlink: '',
ev: '',
xml: ''