-
Install msmtp, a simple sendmail stand-in that sends mail via a relay host (which is what you want, in almost all cases):
brew install msmtp --with-macosx-keyring
The flag with-macosx-keyring will make msmtp use the MacOS keychain, which is a pretty secure way to keep your mail account password secure.
-
Configure it as described in this article. Don't use the manual installation method described there, Homebrew (which we used in step 1) is way more convenient.
-
Have mail use msmtp instead of sendmail by creating .mailrc with the following content (or adding it, it the file already exists):
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
# from http://speakerdeck.com/u/jeg2/p/10-things-you-didnt-know-rails-could-do slide 64 | |
require "csv" | |
namespace :users do | |
desc "Import users from a CSV file" | |
task :import => :environment do | |
path = ENV.fetch("CSV_FILE") { | |
File.join(File.dirname(__FILE__), *%w[.. .. db data users.csv]) | |
} | |
CSV.foreach(path, headers: true, header_converters: :symbol) do |row| |
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
function keychain(){ | |
# Keychain access idea from https://github.com/defunkt/gist | |
if [ "$1" ]; then | |
security 2>&1 >/dev/null find-internet-password -gs "$1" | ruby -e 'puts $1 if STDIN.gets =~ /^password: \"(.*)\"$/' | |
else | |
echo No argument given. The following passwords are in your chain: >&2 | |
security dump-keychain | ruby -e 'ARGF.each_line{|line| puts $1 if line =~ /\"srvr\"<blob>=.(.*).$/}' | |
fi | |
} |
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
for t in $(task _uuid status:pending pro:Backup); do | |
task $t done | |
done |
Due to its small size, ympd is well-suited to run on the Raspberry Pi. Installing it is pretty straightforward:
git clone https://github.com/notandy/ympd.git
cd ympd/
sudo apt-get install cmake libmpdclient-dev
mkdir build
cd build
~/$ git clone https://github.com/todbot/blink1.git
Cloning into 'blink1'...
remote: Counting objects: 8363, done.
remote: Total 8363 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (8363/8363), 79.39 MiB | 3.57 MiB/s, done.
Resolving deltas: 100% (4286/4286), done.
~/$ cd blink1/commandline/
~/blink1/commandline$ sudo apt-get install libusb-dev
Reading package lists... Done
Building dependency tree
yes
keeps repeating a command- Run a quick throwaway container
docker run -it busybox