┌─────┐ ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┐
│ESC │ | F1 │ F2 │ F3 │ F4 | │ F5 │ F6 │ F7 │ F8 │ | F9 │ F10 │ F11 │ F12 │ |PSCR │SLOCK│PAUSE│
└─────┘ └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┴─────┘ └─────┴─────┴─────┘
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬───────────┐ ┌─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┐
│ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BACKSPACE │ |INS │HOME │PGUP │ │NLOCK│ / │ * │ - │
├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬────────┤ ├─────┼─────┼─────┤ ├─────┼─────┼─────┼─────┤
│TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ |DEL |END |PGDN | | 7 | 8 | 9 | |
├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┤ └─────┴─────┴─────┘ ├─────┼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import atan2, cos, exp, fabs, hypot, pi, sin, sqrt | |
from typing import Tuple | |
lab_type = Tuple[float, float, float] | |
hex_type = str # e.g: #ff00ff | |
rgb_type = Tuple[int, int, int] | |
def hex2rgb(v: hex_type) -> rgb_type: | |
return int(v[1:3], 16), int(v[3:5], 16), int(v[5:7], 16) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PGPASSWORD="postgres" | |
DB_USER="postgres" | |
DB_NAME="postgres" | |
DB_HOST="localhost" | |
DB_PORT="5432" | |
exec_sql() { | |
local sql_command="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Requirements: | |
# sudo apt install -y binutils xdg-utils desktop-file-utils squashfuse | |
# | |
# Usage: | |
# python3 install_appimage.py app1.appimage app2.appimage ... | |
import os | |
import shutil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "code": "aa", "name": "Afar" }, | |
{ "code": "ab", "name": "Abkhazian" }, | |
{ "code": "ae", "name": "Avestan" }, | |
{ "code": "af", "name": "Afrikaans" }, | |
{ "code": "ak", "name": "Akan" }, | |
{ "code": "am", "name": "Amharic" }, | |
{ "code": "an", "name": "Aragonese" }, | |
{ "code": "ar", "name": "Arabic" }, | |
{ "code": "as", "name": "Assamese" }, |
Due to backpack pressure, a dark shadow appread on my laptop screen like this:
┌────────────┬┬┬┬┬┬──────┐
│ ┌─terminal─┼┼┼┼┼┼────┐ │
│ │ ││││││ │ │
│ │ ││││││ │ │
│ │ ││││││ │ │
│ │ ││││││ │ │
│ │ ││││││ │ │
Set proxy DNS sudo nano /etc/resolv.conf
# begzar
nameserver 185.55.226.26
nameserver 185.55.225.25
Install (on dev env)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const epoch = 1970 | |
const dayInSeconds = 86400 | |
const hourInSeconds = 3600 | |
const minuteInSeconds = 60 | |
const dayInHours = 24 | |
const toInt = v => parseInt(v) | |
const isLeap = v => ((v % 4 == 0) && (v % 100 != 0)) || (v % 400 == 0) | |
const pad = (v, n = 2) => v.toString().padStart(n, '0') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"log" | |
"net/http" | |
) | |
func main() { | |
port := flag.String("p", "8100", "port to serve on") |
NewerOlder