Skip to content

Instantly share code, notes, and snippets.

View mark-lumbao's full-sized avatar
⌨️
Tweaking my Neovim lua configs

Mark Anthony Ballega Lumbao mark-lumbao

⌨️
Tweaking my Neovim lua configs
View GitHub Profile
@mark-lumbao
mark-lumbao / .inputrc
Last active October 13, 2023 23:25
bash Readline configuration
# check manual for this setting via
# man readline
set editing-mode vi
$if mode=vi
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
$endif
sed 's/[a-z]/\u&/g'
@mark-lumbao
mark-lumbao / vid_concat
Last active March 17, 2022 14:57
Concatenate multiple audio and video files into one .mkv file
#!/bin/env bash
# Concatenate multiple audio and video files
# that are in the same directory into one .mkv file
ls |
xargs -I @ echo "file '@'" >> input.txt &&
ffmpeg -f concat -i input.txt -c copy output.mkv &&
rm input.txt
@mark-lumbao
mark-lumbao / trim_ws
Created March 17, 2022 14:22
Trim all whitespaces for filenames in the current directory
#!/bin/env bash
# Trim all whitespaces for filenames in the current directory
for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done
@mark-lumbao
mark-lumbao / i3configkeybs.sh
Created March 17, 2022 14:20
List all i3wm keybindings
#!/bin/env bash
# List all i3wm keybindings
# Dependecy: glow
i3config=~/.config/i3/config
awk \
'BEGIN {\
printf "\
@mark-lumbao
mark-lumbao / .Xmodmap
Created March 11, 2022 06:47
Remaps in Linux with X11 using xmodmap
! Remap numpads to actual number symbols
keycode 90 = 0
keycode 87 = 1
keycode 88 = 2
keycode 89 = 3
keycode 83 = 4
keycode 84 = 5
keycode 85 = 6
keycode 79 = 7
keycode 80 = 8
@mark-lumbao
mark-lumbao / replace.sh
Created March 7, 2022 13:26
Short script for replacing string values
#!/bin/env bash
# Dependency: nodejs
input=$(cat /dev/stdin)
echo "console.log('$input'.replace('$1', '$2'))" | node
@mark-lumbao
mark-lumbao / datediff.sh
Created March 7, 2022 12:38
Date difference calculator
#!/bin/env bash
##############################
# Date Difference Calculator #
# Dependency: nodejs #
##############################
echo "console.log(Math.round((new Date('$2').getTime() - new Date('$1')) / 86400000), 'days')" | node
@mark-lumbao
mark-lumbao / dmenu_msi-perkeyrgb.sh
Created February 22, 2022 06:23
DMenu helper for setting MSI Perkey RGB keyboard presets and colors
#!/bin/env bash
# TITLE: MSI-PERKEYRGB DMENU HELPER
# AUTHOR: Mark Anthony Lumbao
# DATE: 22 February, 2022
# DEPENDENCY: https://aur.archlinux.org/packages/msi-perkeyrgb
# Select a preset then hit ENTER
# To disable keyboard rgb just TYPE and ENTER "disable"
# To set a single color just TYPE and ENTER the HEX color value just make sure to start with #