Skip to content

Instantly share code, notes, and snippets.

View r17x's full-sized avatar
🤘
REconciling...

RiN r17x

🤘
REconciling...
View GitHub Profile
@r17x
r17x / compress_video
Created August 22, 2024 09:19 — forked from trvswgnr/compress_video
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@r17x
r17x / System Design.md
Created October 19, 2020 18:39 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@r17x
r17x / emulator-install-using-avdmanager.md
Created September 28, 2020 09:39 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"

@r17x
r17x / tmux_basic_usage.md
Created June 22, 2020 08:53 — forked from mberkowski/tmux_basic_usage.md
Tmux Basic Usage

Basic Tmux Usage

https://tmux.github.io/ <-- Tmux project

http://z.umn.edu/tmuxgist <-- this document!

The Prefix Keystroke Ctrl-b

  • Crtl-b c Create a new window
  • Crtl-b <N> Switch to window <N>
  • Crtl-b ? List available keystrokes
  • Crtl-b , Rename current window
@r17x
r17x / SOS.md
Created May 10, 2020 17:51 — forked from vodik/SOS.md
_Never_ -Sy when installing!

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

open Belt;
[@bs.deriving abstract]
type queryConfig('data, 'key, 'fnParamsFilter) = {
[@bs.optional]
retry: int,
[@bs.optional]
retryDelay: int,
[@bs.optional]
initialData: unit => 'data,
@r17x
r17x / mutt_mbsync_multipleaccounts.md
Created November 3, 2019 15:50 — forked from chandraratnam/mutt_mbsync_multipleaccounts.md
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]

@r17x
r17x / introrx.md
Created May 18, 2019 05:59 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@r17x
r17x / example.js
Created April 29, 2019 05:21 — forked from developit/example.js
Preact + Web Components = <333 Demo: http://www.webpackbin.com/VJyU9wK5W
import { h, Component } from 'preact';
import Markup from 'preact-markup';
import register from './preact-custom-element';
// just a proxy component: WC -> Preact -> WC
const A = () => <x-b foo="initial foo from <x-a>" />;
// stateful component that can re-render
class B extends Component {
render(props, state) {
@r17x
r17x / cli-apps-dev.md
Created April 23, 2019 09:14 — forked from wayanjimmy/cli-apps-dev.md
I curate a list of interesting CLI tools, below are some command line tools that I personally love and use

I curate a list of interesting CLI tools, below are some command line tools that I personally love and use

  • ripgrep - Search text for patterns fast.
  • fzf - Command-line fuzzy finder.
  • exa - Replacement for ls written in rust.
  • git - Version control.
  • youtube-dl - Download videos from YouTube and other video sites.
  • tmux - Terminal multiplexer.
  • direnv - Environment switcher for the shell.
  • trash - Move files and folders to the trash.