Skip to content

Instantly share code, notes, and snippets.

View yangwao's full-sized avatar
🥋
Mastering the code

Matej yangwao yangwao

🥋
Mastering the code
View GitHub Profile
@yangwao
yangwao / split_keyboards.md
Created April 18, 2023 20:09 — forked from itod/split_keyboards.md
Every "split" mechanical keyboard currently being sold that I know of

On Feb. 21, 2010, a con­voy of vehicles car­ry­ing ci­vil­ians headed down a moun­tain in cent­ral Afgh­anistan. Amer­ic­an eyes were watch­ing. For more than four hours, the U.S. mil­it­ary — in­clud­ing a Pred­at­or drone crew in Nevada, video screen­ers in Flor­ida, an AC-130 air­plane crew in the sky and an Amer­ic­an spe­cial op­er­a­tions unit on the ground nearby — tracked the con­voy, try­ing to de­cide wheth­er it was friend or foe. This is the of­fi­cial U.S. mil­it­ary tran­script of the ra­dio trans­mis­sions and cock­pit con­ver­sa­tions that day, ob­tained by the Los Angeles Times through a Free­dom of In­form­a­tion Act re­quest.

This is a cleaned up copy of the transcript obtained by the LA Times, retrieved from http://documents.latimes.com/transcript-of-drone-attack/

I downloaded the PDF, ran pdf2txt on it, ran the following Python program to clean it up, then did manual edits.

import sys
@yangwao
yangwao / ksm.py
Last active February 1, 2021 15:17 — forked from vikiival/ksm.py
Price of Edgeware for last 30 days
from pycoingecko import CoinGeckoAPI
import datetime
from statistics import median, mean
cg = CoinGeckoAPI()
def main():
numdays = 30
base = datetime.datetime.today()
date_list = [base - datetime.timedelta(days=x) for x in range(numdays)]
fn_format = lambda x: x.strftime("%d-%m-%Y")
@yangwao
yangwao / nginx-and-certbot-config.md
Created August 1, 2018 10:38 — forked from rkaramandi/nginx-and-certbot-config.md
Running NGINX and CertBot Containers on the Same Host

Running NGINX and CertBot Containers on the Same Host

The Problem

A lot of people run into the problem of running Let's Encrypt's CertBot Tool and an NGINX on the same container host. A big part of this has to do with CertBot needing either port 80 or 443 open for the tool to work as intended. This tends to conflict with NGINX as most people usually use port 80 (HTTP) or 443 (HTTPS) for their reverse proxy. Section 1 outlines how to configure NGINX to get this to work, and Section 2 is the Docker command to run CertBot.

1. NGINX Configuration

I use Docker Compose (docker-compose) for my NGINX server. My docker-compose.yml file looks something like this:

@yangwao
yangwao / config.fish
Created May 13, 2017 10:29 — forked from ronaldsuwandi/config.fish
My personal fish shell config for OS X (better blue colour for directory in dark terminal). Supports git branch and virtualfish for virtualenv
# nice light cyan color instead of dark blue
set -gx LSCOLORS gxfxcxdxbxegedabagacad
function ls --description 'List contents of directory'
command ls -lhFG $argv
end
function df --description 'Displays disk free space'
command df -H $argv
end
@yangwao
yangwao / nginx.conf
Created March 10, 2016 00:35 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048