Skip to content

Instantly share code, notes, and snippets.

View pmeinhardt's full-sized avatar
🚲

Paul Meinhardt pmeinhardt

🚲
View GitHub Profile
@pmeinhardt
pmeinhardt / download-site.md
Created October 10, 2013 17:12
download an entire page (including css, js, images) for offline-reading, archiving… using wget

If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:

$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent  www.website.org/tutorials/html/

This command downloads the website www.website.org/tutorials/html/.

The options are:

  • --recursive: download the entire website
  • --domains website.org: don't follow links outside website.org
@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 / 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 / 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 / capybara.rb
Created October 18, 2012 10:04
capybara iphone driver
# features/support/capybara.rb
# Configure Capybara for use with cucumber.
Capybara.configure do |config|
# Use iPhone as the default browser.
# config.default_driver = :iphone
end
@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