Skip to content

Instantly share code, notes, and snippets.

View mpneuried's full-sized avatar
🏠
Working from home

M. Peter mpneuried

🏠
Working from home
View GitHub Profile
@mpneuried
mpneuried / Makefile
Last active April 19, 2024 21:06
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# 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)
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 19, 2024 18:25
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
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

Instructions

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

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.
@mzabriskie
mzabriskie / README.md
Last active February 5, 2024 15:10
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.

Usage:

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.

@nikneroz
nikneroz / Guardian JWT.md
Last active October 10, 2023 19:13
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.

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.

@selaromi
selaromi / make-flashlight-work-on.yosemite.md
Last active July 25, 2023 19:21
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 http://culater.net/software/SIMBL/SIMBL.php
  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
@rstanley75
rstanley75 / mosquitto
Last active August 12, 2019 18:24
mosquitto init file for openrc on Alpine Linux
#!/sbin/openrc-run
: ${MOSQUITTO_USER:=mosquitto}
: ${MOSQUITTO_GROUP:=mqtt}
: ${MOSQUITTO_CONF:=/etc/mosquitto/mosquitto.conf}
: ${MOSQUITTO_PIDDIR:=/run/mosquitto}
: ${MOSQUITTO_PIDFILE:=${MOSQUITTO_PIDDIR}/${SVCNAME}.pid}
: ${MOSQUITTO_LOGDIR:=/var/log/mosquitto}
: ${MOSQUITTO_PERSISTDIR:=/var/lib/mosquitto}
: ${MOSQUITTO_BINARY:=/usr/sbin/mosquitto}
@dustinboston
dustinboston / rtree.js
Created August 7, 2012 19:50
Generate dependency tree for RequireJS apps
// Usage:
//
// 1. Put this in the file that gets first loaded by RequireJS
// 2. Once the page has loaded, type window.rtree.map() in the console
// This will map all dependencies in the window.rtree.tree object
// 3. To generate UML call window.rtree.toUml(). The output can be used
// here: http://yuml.me/diagram/scruffy/class/draw
requirejs.onResourceLoad = function (context, map, depMaps) {
if (!window.rtree) {
window.rtree = {};