Skip to content

Instantly share code, notes, and snippets.

View pmeinhardt's full-sized avatar
🚲

Paul Meinhardt pmeinhardt

🚲
View GitHub Profile
@pmeinhardt
pmeinhardt / homebrew-font-urls.sh
Created November 9, 2022 20:54
Get URLs for fonts available via Homebrew
brew search --cask /font-.+/ | xargs brew info | grep -E ^https\: | sed -E 's/#[^#]+$//' | sort --unique
@pmeinhardt
pmeinhardt / hmm
Created June 24, 2019 08:37
Find out what you did today
#!/usr/bin/env bash
#
# Find out what you did today
#
# Lists all your commits from repos found in the given paths.
# Use it to prepare your daily stand-up or to write job logs.
#
# Uses `git`, depends on `fd` - install via `brew install fd`.
#
# Usage:
@pmeinhardt
pmeinhardt / otp-ssh-agent-demo-script.erl
Created June 22, 2019 09:43
escript to try out ssh-agent support in OTP
#!/usr/bin/env escript
receive_data() ->
receive
{ssh_cm, _, {closed, __}} ->
io:fwrite("Channel closed~n", []);
{ssh_cm, _, Msg} ->
io:fwrite("SSH message: ~p~n", [Msg]),
receive_data()
after 1000 ->
@pmeinhardt
pmeinhardt / README.md
Last active May 22, 2019 08:53
Develop Erlang/OTP inside a Docker container

Develop Erlang/OTP inside the official erlang/ubuntu-build Docker image.

It comes with all the correct versions of dependencies pre-installed.

Place the develop script in the scripts directory of your local erlang/otp checkout.

namespace :cachetool do
CACHETOOL = 'cachetool.phar'.freeze
desc <<~DESC
Installs #{CACHETOOL} to the shared directory.
This is best used after deploy:starting:
namespace :deploy do
after :starting, 'cachetool:install_executable'
@pmeinhardt
pmeinhardt / Capfile
Created April 18, 2018 13:39
capistrano config for geordi defect
require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/scm/git'
install_plugin Capistrano::SCM::Git
require 'capistrano/bundler'
require 'capistrano/yarn'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'
require 'capistrano/passenger'
# Example code for connecting to OpenSSH ssh-agent and retrieving key information,
# quickly hacked together so please excuse bad naming and style etc.
#
# This is just intended to provide a starting point
#
# http://api.libssh.org/rfc/PROTOCOL.agent
# https://github.com/paramiko/paramiko/blob/master/paramiko/agent.py
# Message constants
ssh2_agentc_request_identities = 11
@pmeinhardt
pmeinhardt / site.yml
Created August 3, 2016 08:23
Create vSphere virtual machines using Ansible
---
- hosts: esxi
connection: local
remote_user: root
become: no
vars_prompt:
- name: hostname
prompt: "Enter the VMware ESXi hostname"
default: "esxi.fritz.box"
private: no
@pmeinhardt
pmeinhardt / shairport-pi.sh
Created June 29, 2016 18:21
AirPlay via Raspberry Pi 3
# Tested on a Raspberry Pi 3 running Raspbian Jessie Lite (2016-05-27,, kernel 4.4)
# – http://computers.tutsplus.com/tutorials/using-a-raspberry-pi-as-an-airplay-receiver--mac-54316
# install dependencies
sudo apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl libmodule-build-perl libasound2-dev libao-dev pulseaudio libpulse-dev avahi-utils libavahi-client-dev
# configure and build
git clone https://github.com/abrasive/shairport.git
cd shairport
./configure
@pmeinhardt
pmeinhardt / config.txt
Last active July 9, 2016 10:52
HiFiBerry Setup (Raspbian Jessie Lite, Kernel 4.4)
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1