Skip to content

Instantly share code, notes, and snippets.

View ferki's full-sized avatar
🆓
I accept new customers

Ferenc Erki ferki

🆓
I accept new customers
View GitHub Profile
@ferki
ferki / vim_plugins
Created April 24, 2023 20:05
Vim plugins
ale
auto-pairs
diffchar.vim
eregex.vim
fzf.vim
goyo.vim
gundo.vim
limelight.vim
markdown-preview.nvim
mkdx
@ferki
ferki / .bashrc
Created June 12, 2023 22:02
.bashrc excerpt for gpg settings
#gpg
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye &> /dev/null
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
@ferki
ferki / Rexfile
Created June 19, 2023 22:00
Preview file changes with Rex
use Rex -feature => [ '1.4', 'exec_autodie' ];
use Rex::Hook::File::Diff; # show diff of file changes by Rex
use if $ENV{PREVIEW}, 'Rex::Hook::File::Impostor'; # use extra hooks if PREVIEW is true
desc 'Demonstrate file preview';
task 'demo', sub {
file '/tmp/rex_file_preview_demo', content => scalar localtime();
};
@ferki
ferki / Rexfile
Created August 24, 2024 17:16
Minimal Rex sudo example
use Rex -feature => [ '1.4', 'exec_autodie' ];
sudo_password 'sudo password';
task test => sub {
say run 'whoami'; # should be normal user
sudo TRUE;
say run 'whoami'; # should be root
};