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
@romainl
romainl / headings.vim
Created September 23, 2017 13:50
Markdown : jump to next heading
" markdown : jump to next heading
function! s:JumpToNextHeading(direction, count)
let col = col(".")
silent execute a:direction == "up" ? '?^#' : '/^#'
if a:count > 1
silent execute "normal! " . repeat("n", a:direction == "up" && col != 1 ? a:count : a:count - 1)
endif
@romainl
romainl / countrepeat.md
Last active November 9, 2024 21:02
Repeat last edit n times

Repeat last edit n times

Did you ever wish you could repeat the last edit an arbitrary number of times without mashing the . key?

Well now you can.

Before

......
@romainl
romainl / nonemptylines.vim
Created September 23, 2017 13:59
Fun with non-empty lines
" jump to next non-empty line
nnoremap <key> :<C-u>call search('^.\+')<CR>
" jump to previous non-empty line
nnoremap <otherkey> :<C-u>call search('^.\+', 'b')<CR>
" extend visual selection to next non-empty line
xnoremap <key> :<C-u>k`\|call search('^.\+')\|normal! <C-r>=visualmode()<CR>``o<CR>
" extend visual selection to previous non-empty line
@qub1750ul
qub1750ul / sxiv-cycle.sh
Created November 24, 2017 20:47
wrapper script for sxiv - browse through images in directory after opening a single file
#!/bin/sh
# Compatible with ranger 1.6.0 through 1.7.*
#
# This script searches image files in a directory, opens them all with sxiv and
# sets the first argument to the first image displayed by sxiv.
#
# This is supposed to be used in rifle.conf as a workaround for the fact that
# sxiv takes no file name arguments for the first image, just the number. Copy
# this file somewhere into your $PATH and add this at the top of rifle.conf:
#

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@chandraratnam
chandraratnam / mutt_mbsync_multipleaccounts.md
Last active January 21, 2025 17:30
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]

@agarrharr
agarrharr / index.md
Last active August 25, 2024 01:19
Common Ledger CLI Commands

Common Ledger CLI Commands

  • Income vs expenses this month?

    $ ledger balance income expenses --period "this month"
  • What did my budget look like at a certain date?

@loilo
loilo / pass-slots.md
Last active February 20, 2025 09:47
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@GammaGames
GammaGames / .bashrc
Last active July 15, 2024 20:19
~/.bashrc
export EDITOR=vim
fortune | cowsay -f duck | lolcat
alias grit=". /home/$USER/Documents/grit/grit"
alias please='sudo $(fc -ln -1)'
alias pyss="python3 /home/$USER/Documents/pyss/pyss.py"
alias serv='python3 -m http.server'
alias timer='echo "Ctrl+C to stop"; time cat'
alias update='sudo apt update && apt list --upgradable'
alias upgrade='sudo apt upgrade && sudo apt autoremove && flatpak update && flatpak remove --unused && update'
alias calc='bc'
@codeinthehole
codeinthehole / .vimrc
Last active April 13, 2021 13:47
~/.vimrc
" ============= " VIMRC file for David Winterbottom (@codeinthehole) " ===========
" Inspiration {{{
" -----------
" Videos:
" - http://www.youtube.com/watch?v=aHm36-na4-4
"
" Articles:
"
" - http://alexpounds.com/blog/2014/06/06/the-vimrc-antiques-roadshow