Skip to content

Instantly share code, notes, and snippets.

@jt0in3e
jt0in3e / mbsync-notify.sh
Last active May 17, 2024 14:26 — forked from nlamirault/gist:38cfc46682eaeb28709e
Sync emails with mbsync and get notifications on new emails
#!/usr/bin/bash
#
# Script to notify user for new mails.
# Crontab ex:
# */3 * * * * $HOME/.local/scripts/mbsync-notify.sh [acc_name]
#
# do not duplicate
killall mbsync &>/dev/null
@alphapapa
alphapapa / dired.sh
Last active April 4, 2021 09:37
Standalone Dired launcher
#!/bin/bash
# Launch Dired in a plain Emacs configuration.
# Arguments are passed to Emacs, e.g. "-nw" works as expected.
emacs -q "$@" \
--eval "(dired default-directory)" \
--eval "(defun kill-window-or-emacs () (interactive) (if (one-window-p) (kill-emacs) (delete-window)))" \
--eval "(setq dired-dwim-target t delete-by-moving-to-trash t)" \
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active July 25, 2024 10:25
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@iocanel
iocanel / nutrition.org
Last active June 18, 2024 18:02
Nutrition tracking with Emacs and Org Mode

Nutrition tracking using Emacs

This is not a blog post. This is my Emacs powered nutrition tracker!

No, I mean it!

It’s the one file that contains all the code, templates and data of my tracker,

@cedws
cedws / defer.sh
Last active July 5, 2024 13:31
Go-like defer 'keyword' for shell
#!/bin/sh
DEFER=
defer() {
DEFER="$*; ${DEFER}"
trap "{ $DEFER }" EXIT
}
@A6GibKm
A6GibKm / mu4e.md
Last active July 14, 2024 21:42
Read your emails with mu4e

Connecting emacs and Protonmail Bridge

This guide will cover the basics on how to integrate emacs with protonmail-bridge using

Configuring mbsync

@fntlnz
fntlnz / i3wm-fedora.md
Last active July 8, 2021 01:31
i3wm fedora lightdm

Install i3

dnf install i3

Add exec i3 to xinitrc

echo "exec i3" > ~/.xinitrc
@paulirish
paulirish / what-forces-layout.md
Last active July 29, 2024 01:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@wwitzel3
wwitzel3 / mailsync.sh
Created January 2, 2015 20:55
imapsync for fastmail to local Maildir
#!/bin/bash
set +x
imapsync --host1 mail.messagingengine.com --user1 USERNAME --password1 PASSWORD \
--host2 localhost --user2 USERNAME --password2 PASSWORD \
--ssl1 --noauthmd5 --split1 100 --split2 100 \
--useheader 'Message-Id' --syncinternaldates --skipsize --allowsizemismatch \
--include "Sent Mail|Sent|Sent Items" --exclude "All Mail" \
--delete2 --expunge2 --nolog