Skip to content

Instantly share code, notes, and snippets.

Connecting emacs and Protonmail Bridge

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

  • mu4e
  • mbsync
  • smtpmail

I am going to assume that you already have installed the mentioned software, I am using Fedora 27 but it should work on any GNU/Linux distribution.


REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2018/06/19 18:47


NOTES

AppleScript is a rather peculiar scripting language to learn.

@pbt001
pbt001 / add-ssh-key-to-agent.bash
Created July 10, 2019 10:06 — forked from HansCz/add-ssh-key-to-agent.bash
SSH (Bash) - adding key to ssh-agent
# Linux
eval `ssh-agent`
ssh-add ~/.ssh/some_key_rsa
ssh user@server
# Mac
## As of the Leopard release of OS X, ssh-agent is more tightly integrated with Keychain. It is possible to store the passphrases of all of your SSH keys securely in Keychain, from which ssh-agent will read them on startup. The bottom line is that it is simple to secure your keys with passphrases, but never have to type the passphrase to use them! Here is how:
## Add the pass phrase to each ssh key to keychain:
@pbt001
pbt001 / gist:11708f3cc8d361c5a4a92041bb8916e9
Created July 22, 2019 20:30 — forked from richfitz/gist:2324707
Install MinionPro on OSX
#!/bin/sh
## Information
## http://carlo-hamalainen.net/blog/2007/12/11/installing-minion-pro-fonts/
## http://www.ctan.org/tex-archive/fonts/mnsymbol/
## 0: Install
## http://www.lcdf.org/type/
## I used --without-kpathsea to configure (with MacTeX 2011):
##
## ./configure --without-kpathsea
@pbt001
pbt001 / simple_HMC_1d.R
Created September 23, 2019 17:00 — forked from rmcelreath/simple_HMC_1d.R
Simple Hamiltonian Monte Carlo example, 1-dimensional Gaussian, location against time
HMC2 <- function (U, grad_U, epsilon, L, current_q , ... ) {
q = current_q
p = rnorm(length(q),0,1) # independent standard normal variates
current_p = p
# Make a half step for momentum at the beginning
p = p - epsilon * grad_U( q , ... ) / 2
# Alternate full steps for position and momentum
qtraj <- matrix(NA,nrow=L+1,ncol=length(q))
ptraj <- qtraj
qtraj[1,] <- current_q
@pbt001
pbt001 / bayes_instrument.R
Created September 23, 2019 17:01 — forked from rmcelreath/bayes_instrument.R
Bayesian implementation of instrumental variable regression (using rstan)
# install rethinking library with instructions here:
# https://github.com/rmcelreath/statrethinking_winter2019
library(rethinking)
library(dagitty)
library(shape)
# the structural model
# W: wages
# Q: quarter of year of birth
@pbt001
pbt001 / bayes_Lund_2017.R
Created September 23, 2019 17:02 — forked from rmcelreath/bayes_Lund_2017.R
Bayes@Lund2017 examples
# script for examples in Bayes@Lund2017 presentation
# joint model example
notes_max <- 10
rate_max <- 5
pm <- matrix( NA , nrow=rate_max+1 , ncol=notes_max+1 )
for ( i in 1:(rate_max+1) )
for ( j in 1:(notes_max+1) )
pm[i,j] <- dpois( j-1 , lambda=i ) * (1/(rate_max+1))
@pbt001
pbt001 / VDL_simpson_paradox.R
Created September 23, 2019 17:02 — forked from rmcelreath/VDL_simpson_paradox.R
Replication and reanalysis for: van der Lee and Ellemers 10.1073/pnas.1510159112 . Published reanalysis: 10.1073/pnas.1518936112
######################
# Replication and reanalysis for:
# van der Lee and Ellemers 10.1073/pnas.1510159112
# load data from supplemental Table S1
# found at http://www.pnas.org/content/early/2015/09/16/1510159112/suppl/DCSupplemental
d <- read.csv("http://xcelab.net/VDL_data.csv")
d$rejects <- d$applications - d$awards
@pbt001
pbt001 / RubyOnArch.md
Created December 31, 2019 01:05 — forked from jhass/RubyOnArch.md
My Ruby setup on Archlinux

Ruby on Archlinux

I thought I would document my setup, since it's somewhat non-standard but working quite well for me.

What this does

  • Install major Ruby versions at their latest patch release
  • Allow to switch between them seamlessly
  • Use chruby
  • Encourage bundler usage
@pbt001
pbt001 / asciidoc-syntax-quick-reference.adoc
Created February 23, 2020 23:27 — forked from mojavelinux/asciidoc-syntax-quick-reference.adoc
AsciiDoc Syntax Quick Reference (sample document)

AsciiDoc Syntax Quick Reference