Skip to content

Instantly share code, notes, and snippets.

View Matt-Deacalion's full-sized avatar
🏹
Ready, Fire, Aim!

Matt Matt-Deacalion

🏹
Ready, Fire, Aim!
  • Budapest, Hungary
View GitHub Profile

Shell pipes & redirects

Summary, syntax, examples.

@christianparpart
christianparpart / terminal-synchronized-output.md
Last active April 29, 2025 08:25
Terminal Spec: Synchronized Output

Synchronized Output

Synchronized output is merely implementing the feature as inspired by iTerm2 synchronized output, except that it's not using the rare DCS but rather the well known SM ? and RM ?. iTerm2 has now also adopted to use the new syntax instead of using DCS.

Semantics

When rendering the screen of the terminal, the Emulator usually iterates through each visible grid cell and renders its current state. With applications updating the screen a at higher frequency this can cause tearing.

This mode attempts to mitigate that.

Simple Templates In Vim

Vim has :h skeleton help topic for when you want to read a skeleton (template) file into a new file.

For me the idea of automatic templates is not that appealing, instead I would rather insert a template when I need it:

:r ~/.vim/asciidoctor/template_for_entity_relation_diagram

@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that
@rusty-snake
rusty-snake / xdg-open.c
Last active March 28, 2025 16:29
xdg-open.c – A xdg-open drop-in wrapper to make xdg-open work nicely with firejail.
/*
* Copyright © 2021 rusty-snake
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@kat0h
kat0h / vim9script4pythondevelopers.md
Last active January 15, 2025 12:26
Vim9 script for Python Developers

Vim9 script for Python Developers

Vim9 scriptはVim scriptとの互換をなくし変数の型縛りを導入したり、コンパイルをすることなどにより、高速化を実現した新しい処理系です。

defコマンドで定義された関数内、またはVim script内でvim9scriptコマンドを使うことで利用できます(vim9scriptコマンドの後ではfunctionコマンドは利用できません)。

この記事は、 https://gist.github.com/yegappan/16d964a37ead0979b05e655aa036cad0 の内容を元にVim(v8.2.2576)上のVim9 scriptで動作するように改変したものです。

Vim9 scriptで動作を確認できなかったもの、まだ実装されていなものはpassと表記し、省略しています。

@valyakuttan
valyakuttan / arch_network.md
Last active August 13, 2023 15:27
Arch Linux Network Setup With dnscrypt-proxy

Arch Linux Network Setup With dnscrypt-proxy

Install and Configure iwd

  1. Install iwd and openresolv

         $ sudo pacman -S iwd openresolv
  2. Configure iwd by editing /etc/iwd/main.conf

@Jiab77
Jiab77 / setup-DNS-over-TLS-with-systemd-on-ubuntu-18.04.md
Last active August 23, 2024 22:43
This gist will explain how to setup DNS-over-TLS on your local computer.

Setup DNS-over-TLS with systemd on Ubuntu 18.04

This gist will explain how to setup DNS-over-TLS on your local computer.

Verify systemd version

To make it work, you need at least systemd version 237 or 242.

I'll use the version 242 in this gist.

@themarcba
themarcba / vuejs-like-reactive-state.html
Last active February 5, 2024 11:52
Vue.js-like reactive state
<script>
let activeEffect
class Dep {
subscribers = new Set()
depend() {
if (activeEffect) this.subscribers.add(activeEffect)
}
notify() {
this.subscribers.forEach((sub) => sub())
@johnnypea
johnnypea / useful-one-liners.sh
Last active May 1, 2025 23:21
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar