Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
benevidesh / zn
Last active Sep 19, 2022
Zettelkasten Workflow (WIP)
View zn
# zn - as zettell
# new export variables EDITOR for your editor and
#+ NOTES for your notes folder.
main () {
note_id=$(date +'%Y%m%d%H%M%S')
$EDITOR $NOTES/"$note_id".md
miketahani /
Created Aug 11, 2020
Raspberry Pi 4 with external boot SSD

Raspberry Pi 4 setup

For barebones initial setup of a Pi to boot from an external, USB-connected SSD.

Follow instructions in this tutorial, reproduced below:

  1. Flash SD card using Raspberry Pi Imager

  2. touch /Volumes/<volume>/ssh to enable SSH on boot

tbutts /
Last active Aug 18, 2022
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./ ~/.tmux.conf.orig > ~/.tmux.conf
villeheilala / .muttrc
Created Aug 17, 2018
Minimal configuration for Neomutt/Mutt and Gmail/G Suite
View .muttrc
# Minimal configuration for Neomutt/Mutt and Gmail/G Suite
# Decrypts passwords quietly
# see:
source "gpg -dq $HOME/.my-pwds.gpg |"
# Username and password for your Gmail/G Suite account
set imap_user = "john.snow@winterfell.ext"
# Password assigned from decrypted file
set imap_pass = $my_pass
adriennetacke / countdown.js
Last active Sep 1, 2022
Countdown timer in pure JavaScript
View countdown.js
function countdown(endDate) {
let days, hours, minutes, seconds;
endDate = new Date(endDate).getTime();
if (isNaN(endDate)) {
setInterval(calculate, 1000);

I hate props drilling (my background)

I hate props drilling. I despise it. Is spent the last years writing C++ and fighting hard with my code habits to have a code that is not just working, but also semantically correct. Having code that makes sense is hard, but has all the possible qualities good code can have: since the concerns are well delimited, each class / component / module tends to be independant, reusable, and easily testable. Your code just makes sense. It's also simpler, because the design is just good. The maintainability is greater. And all sorts of things.

karanssj4 / .eslintrc.js
Created Mar 2, 2018
Make eslint work with vueJs with eslint-plugin-vue (tested with eslint-plugin-vue v4.3.0)
View .eslintrc.js
module.exports = {
root: true,
parserOptions: {
sourceType: 'module',
parser: 'babel-eslint',
env: {
browser: true,
gricard /
Last active Jun 3, 2021
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here:

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
chandraratnam /
Last active Oct 1, 2022
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]

VladimirPal / neomuttrc
Last active Sep 9, 2022
Minimal neomutt config for gmail imap
View neomuttrc
set imap_user=""
set imap_pass=`/usr/bin/security find-generic-password -w -a '' -s 'Gmail'`
set folder=imaps://
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# search sleep_time for additional info
set sleep_time=0 # be faster