Skip to content

Instantly share code, notes, and snippets.

View tie's full-sized avatar
🍔
The devil is in the detail.

Ivan Trubach tie

🍔
The devil is in the detail.
View GitHub Profile
@tie
tie / TextReplacement.plugin.js
Last active February 9, 2023 09:11
BetterDiscord plugin that enables auto-correct (text replacements) for message text area
/**
* @name TextReplacement
* @author Ivan Trubach
* @authorId 783087994419675201
* @description Enable autocorrect for messages, specifically text replacements on macOS.
* @version 0.0.4
*/
const memoSymbol = Symbol.for("react.memo")
@tie
tie / crond
Created November 15, 2020 21:08
OpenWrt scheduled update and reboot
0 5 * * * opkg update && opkg list-upgradable | cut -d ' ' -f 0 | xargs -r opkg --autoremove upgrade -- && reboot
@tie
tie / bits.c
Last active December 20, 2019 06:53
All binary strings of length n containing exactly k ones.
/*
// Poor man’s C++ solution.
#include<algorithm>
#include<string>
#include<iostream>
int main() {
int n, k;
std::cin >> n >> k;
@tie
tie / tricks.md
Last active August 7, 2019 20:24
Not so obvious things

Linux things

Fix stupid Docker

Docker daemon messes up iptables configuration.

>/etc/docker/daemon.json cat <<EOF
{
	"iptables": false
@tie
tie / TTGL.svg
Created March 24, 2017 23:31
TOUCH THE UNTOUCHABLE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.