Skip to content

Instantly share code, notes, and snippets.

@amiorin
amiorin / README.md
Last active May 21, 2024 18:53
How to configure Home Row Mods with KMonad on macOS

Intro

Karabiner and KMonad are great open source software. Don't forget to support the authors and contributors.

If you want to try home row mods on OSX, don't use Karabiner but KMonad. KMonad is harder at the beginning but then it is easier than Karabiner. Creating layers in KMonad is trivial and without drawbacks, while it is impossible in Karabiner without drawbacks.

You need to compile a PR of the project. Install https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice/releases/download/v2.1.0/Karabiner-DriverKit-VirtualHIDDevice-2.1.0.pkg

@SkaTeMasTer
SkaTeMasTer / top-25-ssh-commands-tricks
Created January 18, 2017 00:32
25 Best SSH Commands / Tricks
1) Copy ssh keys to user@host to enable password-less ssh logins.
ssh-copy-id user@host
To generate the keys use the command ssh-keygen
2) Start a tunnel from some machine’s port 80 to your local post 2001
ssh -N -L2001:localhost:80 somemachine
@owlscatcher
owlscatcher / wireguard.md
Last active May 21, 2024 18:51
Инструкция по нрастройке своего VPN сервера на облаке DigitalOcean
@bran921007
bran921007 / gist:da54425cb00c20cdb3ea
Created November 21, 2015 21:47
Detectar si el usuario esta activo o inactivo - Idle javascript
<script>
var timeoutID;
function setup() {
this.addEventListener("mousemove", resetTimer, false);
this.addEventListener("mousedown", resetTimer, false);
this.addEventListener("keypress", resetTimer, false);
this.addEventListener("DOMMouseScroll", resetTimer, false);
this.addEventListener("mousewheel", resetTimer, false);
this.addEventListener("touchmove", resetTimer, false);
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 21, 2024 18:47
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@tianon
tianon / oci-garbage
Created May 20, 2024 21:51
A very, *very* basic PoC of using `jq` to manage and manipulate OCI layouts.
#!/usr/bin/env bash
set -Eeuo pipefail
oci="$PWD" # TODO parameter/flag (and pass it aruond to other oci tools correctly!)
# ~validate $oci is an OCI layout
[ -s "$oci/oci-layout" ]
jq -se 'length == 1 and .[0].imageLayoutVersion == "1.0.0"' "$oci/oci-layout" > /dev/null
# TODO more/better validation? definitely better error handling
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@wojteklu
wojteklu / clean_code.md
Last active May 21, 2024 18:43
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

⚠️ NOT FOR NAVIGATIONAL USE!
These are flash cards I made from study materials and nothing here is fit for navigational use.


If you find any errors, please let me know in the comments below.

Various

@diffficult
diffficult / installing_virt_manager.md
Last active May 21, 2024 18:42
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group: