Skip to content

Instantly share code, notes, and snippets.

@oren-l
oren-l / pre-commit
Last active November 17, 2021 13:58
pre-commit hook that limits number of characters in a commit (including binary files)
#!/bin/sh
# meant to be used with husky: https://github.com/typicode/husky/blob/main/README.md
# tested on macos and ubuntu
. "$(dirname "$0")/_/husky.sh"
max_size=500000
echo "committed files:"
@oren-l
oren-l / cloudSettings
Created January 7, 2020 07:49
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-01-07T07:49:12.444Z","extensionVersion":"v3.4.3"}
@oren-l
oren-l / vim-regex.txt
Created December 22, 2019 16:25
vim find comments multiline non-greedy
/<!--\_.\{-}-->/
@oren-l
oren-l / keymap.xml
Last active July 17, 2019 14:33
kodi v17.6 (Debian) adding subtitle search key binding (shortcut)
<keymap>
<FullscreenVideo>
<keyboard>
<u>ActivateWindow(SubtitleSearch)</u>
</keyboard>
</FullscreenVideo>
</keymap>
@oren-l
oren-l / ubuntu-suspend-fix.txt
Last active August 26, 2019 18:29
Solution for Ubuntu suspend not resuming previous state
Issue: After waking up from suspend, the system does not resume the previous state.
Hardware: Dell Vostro 5481 i5 8265U
OS: Ubuntu 18.04.1
Solution:
from https://ubuntuforums.org/showthread.php?t=1556934
1. create folder '/etc/grub' -- `sudo mkdir /etc/grub`
@oren-l
oren-l / .gitconfig
Last active November 29, 2022 14:19
[init]
# defaultBranch = main
[core]
editor = vim
# editor = code --wait
pager = less -F -X
[push]
default = simple
[pull]
# rebase = true