Skip to content

Instantly share code, notes, and snippets.

View rhoit's full-sized avatar
🎪
An empty shell

rho rhoit

🎪
An empty shell
View GitHub Profile
#!/bin/bash
for i in 05/*mp4; do
srt="${i/.mp4/.en.srt}"
[ -e "$srt" ] || continue
mkvmerge -o "out/${i/.mp4/.mkv}" "--forced-track" "0:no" "-s" "0" "-D" "-A" "-T" "--no-global-tags" "--no-chapters" "(" "$srt" ")" "--forced-track" "0:no" "--forced-track" "1:no" "-a" "1" "-d" "0" "-S" "-T" "--no-global-tags" "--no-chapters" "(" "$i" ")" "--track-order" "0:0,1:0,1:1"
done
@rhoit
rhoit / install.sh
Created June 20, 2016 07:57 — forked from ssokolow/install.sh
Simple XDG Install Script for Linux Games
#!/bin/sh
#
# Simple XDG Install Script for Linux Games
#
# Features:
# - Communicates with the desktop via the xdg-utils vendor integration scripts.
# (No need to upgrade if the implementation details change.)
# - Icons are resolved via the desktop theming system, granting theme
# developers the ability to provide customized versions which preserve the
# overall system aesthetic.
@rhoit
rhoit / css.md
Created July 5, 2016 15:49 — forked from ptomato/css.md
GTK CSS properties
acchakat; [att͡ʃaˈkat] vtr(to silence) {Vsup|acchak}
acchorkat; [att͡ʃoɾˈkat] vtr(to roll)
achra; [ˈat͡ʃɾa] adj(smelly)
achrakh; [at͡ʃˈɾax] ni(smell) ni(stink)
achralat; [at͡ʃɾaˈlat] v(to be smelly, to give off a smell) {Vsup|achra}
adakhat; [adaˈxat] v(to eat) {Vsup|adakh}
adakhilat; [adaxiˈlat] v(to feed <specifically to feed on, or to feast on>) {Vsup|adakhi}
addakhat; [addaˈxat] vtr(to feed)
addiwelat; [addiweˈlat] vtr(to moisten)
addo ajjalani; [ˈaddo ˈadd͡ʒalani] np(midnight)
def multipart_encoder(params, files):
boundry = uuid.uuid4().hex
lines = list()
for key, val in params.items():
if val is None: continue
lines.append('--' + boundry)
lines.append('Content-Disposition: form-data; name="%s"'%key)
lines.extend([ '', val ])
for key, uri in files.items():

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

#!/usr/bin/env python3
import math
import turtle
turtle.speed(0)
# turtle.tracer(n=0, delay=0)
def square(length):
for i in range(4):
# मान्छे
मान्छेको यो चोला
कसरी बित्यो, खै के होला
छैन केहि उसको पोल्टोमा
बाँचेकै छ, तर त्यो मृग तृष्णामा
आसा थियो ठुलो,
उसका ती मिठा सपना
ब्‍यूँझाउन खोज्थो अरूले
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
// A lot of hidden blocks are drawn, I don't really care
int[][] result;
float t, c;
import numpy as np
import matplotlib.pyplot as plt
methods = [
'none', 'bessel', 'bicubic', 'bilinear', #'antialiased',
'catrom', 'gaussian', 'hamming', 'hanning', 'hermite', 'kaiser',
'lanczos', 'mitchell', 'nearest', 'quadric', 'sinc', 'spline16',
'spline36',
]
np.random.seed(0)