Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

denisinla

:octocat:
View GitHub Profile
@miketahani
miketahani / rpi4-setup.md
Created Aug 11, 2020
Raspberry Pi 4 with external boot SSD
View rpi4-setup.md

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 Sep 3, 2021
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
View tmux-migrate-options.py
#!/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
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: 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"
# Password assigned from decrypted file
set imap_pass = $my_pass
@adriennetacke
adriennetacke / countdown.js
Last active Dec 28, 2020
Countdown timer in pure JavaScript
View countdown.js
function countdown(endDate) {
let days, hours, minutes, seconds;
endDate = new Date(endDate).getTime();
if (isNaN(endDate)) {
return;
}
setInterval(calculate, 1000);
View I_hate_props_drilling.md

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 Mar 2, 2018
Make eslint work with vueJs with eslint-plugin-vue (tested with eslint-plugin-vue v4.3.0)
View .eslintrc.js
// 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 Jun 3, 2021
Just some notes about my attempt to upgrade to webpack 4
View webpack4upgrade.md

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 Sep 20, 2021
Mutt + isync mbsync + gmail + multiple accounts.
View mutt_mbsync_multipleaccounts.md

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 Sep 20, 2021
Minimal neomutt config for gmail imap
View neomuttrc
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
@jshimko
jshimko / deploy.sh
Created Jan 16, 2017
Rancher 1.3 deployment
View deploy.sh
# start a server on AWS
# (see docs for options)
# https://docs.docker.com/machine/drivers/aws/
docker-machine create --driver amazonec2 \
--amazonec2-access-key <YOUR ACCESS KEY> \
--amazonec2-secret-key <YOUR SECRET KEY> \
--amazonec2-instance-type t2.medium \
rancher-test
# Nginx