Skip to content

Instantly share code, notes, and snippets.

@mkrupczak3
mkrupczak3 / Homoglyphs.md
Created August 8, 2022 19:25 — forked from StevenACoffman/Homoglyphs.md
Unicode Look-alikes

Unicode Character Look-Alikes

Original Letter Look-Alike(s)
a а ạ ą ä à á ą
c с ƈ ċ
d ԁ ɗ
e е ẹ ė é è
g ġ
h һ
@mkrupczak3
mkrupczak3 / malloc.c
Created December 10, 2019 19:45 — forked from ki7chen/malloc.c
malloc by Doug Lea, source file
/*
This is a version (aka dlmalloc) of malloc/free/realloc written by
Doug Lea and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain. Send questions,
comments, complaints, performance data, etc to dl@cs.oswego.edu
* Version 2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)
Note: There may be an updated version of this malloc obtainable at
ftp://gee.cs.oswego.edu/pub/misc/malloc.c
@mkrupczak3
mkrupczak3 / binarySearchNearest.py
Created April 27, 2022 23:30
binary search for the element closest to a value in a list
"""given a list and value, return the index of the element closest to value
Parameters
----------
list: a sorted list of values
val: a value to search for
"""
def binarySearchNearest(list, val):
if len(list) == 0:
return None
@mkrupczak3
mkrupczak3 / nginx_deployment.yaml
Created November 17, 2021 23:11 — forked from petitviolet/nginx_deployment.yaml
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
@mkrupczak3
mkrupczak3 / miui-instagram-video-encoding-fix.md
Created October 11, 2021 20:03
Splitting, cropping and converting video for Instagram

Short description

Just a short reminder to self, when i'll be struggling with uploading video to Instagram. For some reason my MIUI v5 port has troubles with recording proper video to be successfully uploaded to Instagram.

First of all: encoding should be mpeg4, not h264!, regardless of file extension (but should probably be mp4).

All the options passed to ffmpeg are order dependant: first options executed first, last will override previous. Thus, input file is defined early, output file is defined at the very end.

All filters can be setup per stream (a for audio and v for video) and should be defined as -filter (for both),

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

@mkrupczak3
mkrupczak3 / Video_Enc_Notes.txt
Last active August 16, 2021 17:36
A set of notes for how I set up my twitch stream
Twitch official notes:
https://stream.twitch.tv/encoding/
Why use I NVENC (NVIDIA Turing and better) GPU ASIC encoding instead of CPU encoding?
https://youtu.be/6fyP7kg0QAc?t=434
NVENC is available on Maxwell arch. GPU's (GTX 10XX and later), but is vastly improved starting w/ the RTX (Turing & Ampere) cards.
GPU encoding = Fast but dumb
CPU encoding = Smart but slow:
https://askubuntu.com/a/1049313
sudo apt-get install cpufrequtils
echo 'GOVERNOR="performance"' | sudo tee /etc/default/cpufrequtils
sudo systemctl disable ondemand
https://retropie.org.uk/docs/Sound-Issues/
The Sheep Look Up:
Neonicotinoids
Chlorpyrifos
https://www.theatlantic.com/health/archive/2014/03/the-toxins-that-threaten-our-brains/284466/
https://www.nytimes.com/2020/09/23/climate/epa-pesticide-chlorpyrifos-children.html