This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- install the two shellscripts into the appropriate places under /etc/initramfs-tools | |
- run update-initramfs | |
- put "overlay=yes" on the kernel command line | |
- reboot | |
With the overlay in place, the real root is mounted readonly on /ro. | |
Only the root fs is changed, other filesystems are mounted normally. | |
Remove "overlay=yes" (or change it to something other than yes) and reboot to go back to readwrite. | |
(This probably means that you want the commandline config to live somewhere other than on the root fs, e.g. under /boot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Specific Notmuch filters (and saved-searches) for: | |
+ The Feed (newsletters, blogs) | |
+ The Paper trail (receipts, ledger) | |
+ Screened Inbox (mail from folks you actually want to read) | |
+ Previously Seen (important mail that you've already read) | |
+ Unscreened Inbox (potential spam / stuff you don't want) | |
- Elisp Functions to move / categorize emails from a particular sender. | |
+ Adds tags needed by filters defined above to all email sent by a particular sender | |
+ Creates an entry in a DB file, which is used by the Notmuch post-new script when indexing new email, to auto-add the relevant tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.range; | |
struct StackFrame(T) | |
{ | |
StackFrame* prev; | |
T range; | |
} | |
struct StackRange(T, alias recurse) if (isInputRange!(typeof(recurse(T.init)))) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm(list = ls()) #reset the environment | |
library(tidyverse) | |
library(lubridate) | |
library(mgcv) | |
exponent_weight <- function(i) { | |
exp(-0.04*i) | |
} | |
TODAY_DAY <- difftime(Sys.Date(),as.Date("2017-01-21")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[database] | |
path=/home/USER/mail | |
[user] | |
name=MyName MySurname | |
primary_email=me@example.com | |
other_email=me@example.org | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package company | |
:ensure t | |
:custom | |
(company-quickhelp-delay 0) | |
(company-tooltip-align-annotations t) | |
:hook | |
((prog-mode utop-mode) . company-mode) | |
:config | |
(company-quickhelp-mode 1) | |
:bind |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Root Check | |
if [ $(whoami) != 'root' ]; then | |
echo "ERROR: Must be root to run $0" | |
exit 1; | |
fi | |
TRUSTED_PORTS=( swp1 swp3 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |