Skip to content

Instantly share code, notes, and snippets.

Working from home

M. Peter mpneuried

Working from home
View GitHub Profile
View optolink.yaml
rstanley75 / mosquitto
Last active Aug 12, 2019
mosquitto init file for openrc on Alpine Linux
View mosquitto
: ${MOSQUITTO_USER:=mosquitto}
: ${MOSQUITTO_CONF:=/etc/mosquitto/mosquitto.conf}
: ${MOSQUITTO_PIDDIR:=/run/mosquitto}
: ${MOSQUITTO_LOGDIR:=/var/log/mosquitto}
: ${MOSQUITTO_PERSISTDIR:=/var/lib/mosquitto}
: ${MOSQUITTO_BINARY:=/usr/sbin/mosquitto}
nikneroz / Guardian
Last active May 31, 2021
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.
View Guardian

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

mpneuried / Makefile
Last active Jun 17, 2021
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
selaromi /
Last active Oct 28, 2018
Steps to make Flashlight work on 10.10.4 (doesn't work for El Capitan)

Make Flashlight work on 10.10.4

  1. Install SIMBL
  2. Copy SpotlightSIMBL.bundle to /Library/Application Support/SIMBL/Plugins/ (a)
  3. Copy Flashlight.osax to ~/Library/ScriptingAdditions/ (b)
  4. Disable Flashlight
  5. Enable Flashlight
  6. Open Script Editor on your Mac (look for "Script Editor In Spotlight") and paste the following code (don't change Snow Leopard for Yosemite)
tell application "Spotlight" to inject SIMBL into Snow Leopard
kevin-smets /
Last active Jun 21, 2021
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)





openssl genrsa 2048 > host.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
#[enter * for the Common Name]
openssl x509 -noout -fingerprint -text < host.cert >
cat host.cert host.key > host.pem
Trust cert
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain host.cert
mzabriskie /
Last active May 2, 2021
Check git status of multiple repos

If you're like me you have a dir like ~/Workspace/Github where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.


git-status [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.

dergachev /
Last active Jun 21, 2021
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application: