Skip to content

Instantly share code, notes, and snippets.

View denisinla's full-sized avatar
👋

denisinla

👋
View GitHub Profile
@benevidesh
benevidesh / zn
Last active March 12, 2024 16:10
Zettelkasten Workflow (WIP)
#!/usr/bin/bash
# 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
miketahani / rpi4-setup.md
Created August 11, 2020 18:29
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
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# 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-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@villeheilala
villeheilala / .muttrc
Last active November 2, 2023 12:24
Minimal configuration for Neomutt/Mutt and Gmail/G Suite
# A minimal configuration for Neomutt/Mutt and Gmail/G Suite
# For more information, see:
# https://heilala.medium.com/command-line-email-with-neomutt-and-gmail-d558864ac3c8?source=friends_link&sk=4dbd90b6b7aebca3bce8d94c9a053168
# Decrypts passwords quietly
# see: https://wiki.archlinux.org/index.php/Mutt#Passwords_management
source "gpg -dq $HOME/.my-pwds.gpg |"
# Username and password for your Gmail/G Suite account
set imap_user = "john.snow@winterfell.ext"
@adriennetacke
adriennetacke / countdown.js
Last active September 1, 2022 04:18
Countdown timer in pure JavaScript
function countdown(endDate) {
let days, hours, minutes, seconds;
endDate = new Date(endDate).getTime();
if (isNaN(endDate)) {
return;
}
setInterval(calculate, 1000);
@Vermeille
Vermeille / I_hate_props_drilling.md
Last active March 5, 2018 11:11
React thoughts

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
karanssj4 / .eslintrc.js
Created March 2, 2018 07:57
Make eslint work with vueJs with eslint-plugin-vue (tested with eslint-plugin-vue v4.3.0)
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
sourceType: 'module',
parser: 'babel-eslint',
},
env: {
browser: true,
@gricard
gricard / webpack4upgrade.md
Last active February 29, 2024 20:23
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: https://cdgd.tech

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 https://webpack.js.org. 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
chandraratnam / mutt_mbsync_multipleaccounts.md
Last active March 27, 2024 00:46
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
VladimirPal / neomuttrc
Last active March 30, 2024 11:59
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster