Skip to content

Instantly share code, notes, and snippets.


Immanuel Potter immanuelpotter

View GitHub Profile
sadikay / video-to-gif.bash
Last active Feb 14, 2019
.mov to .gif - Convert quick time player videos to gif format on macOs command line.
View video-to-gif.bash
brew install ffmpeg
brew cask install x-quartz #dependency for gifsicle, only required for mountain-lion and above
open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg # runs the XQuartz installer
brew install gifsicle
ffmpeg -i ~/Desktop/ -s 920x540 -pix_fmt rgb24 -r 18 -f gif - | gifsicle --optimize=3 --delay=3 > ~/Desktop/out.gif
apetresc / foxyproxy.json
Created Oct 25, 2017
A FoxyProxy 6.x (for Firefox) version of the AWS EMR filters
View foxyproxy.json
"mode": "patterns",
"proxySettings": [
"title": "EMR SOCKS Proxy",
"type": 3,
"color": "#cc8c2a",
"address": "localhost",
"port": 8157,
"proxyDNS": true,
lmakarov / lambda-basic-auth.js
Created Aug 30, 2017
Basic HTTP Authentication for CloudFront with Lambda@Edge
View lambda-basic-auth.js
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
plindberg /
Created Aug 5, 2017
How to set up an AWS Lambda function for returning S3 pre-signed URLs for uploading files.


Granted, this is little more than an obfuscated way of having a publicly writable S3 bucket, but if you don’t have a server which can pre-sign URLs for you, this might be an acceptable solution.

For this to work, you take the following steps:

  1. Create a Lambda func, along with a new IAM role, keeping the default code.
  2. Create an API in the API Gateway.
HardenedArray / Encrypted Arch Linux VirtualBox Guest Installation Procedure
Last active Mar 21, 2021
Efficient Encrypted Arch Linux Guest Installation in VirtualBox with a Full Plasma/KDE Environment. Perfect for Arch Linux Evaluation and Experimentation!
View Encrypted Arch Linux VirtualBox Guest Installation Procedure
# OBJECTIVES: Install Arch Linux as a VirtualBox Guest with a complete Plasma5/KDE environment.
# Provide encrypted root and swap filesystems and UEFI boot our Arch Guest from within VirtualBox.
# Note: This install method is specific to VirtualBox (VBox) to allow non-Arch users and Arch testers to evaluate a properly
# configured and secure Arch OS while running a fully enabled Plasma/KDE system, and also by concurrently taking advantage
# of the multiple isolation safeguards inherently provided by the VBox environment.
# For those who want to install Arch on bare metal in a way that supports both dedicated Arch installations and Arch
# installation on a SSD/HDD multi-OS-UEFI-booting system, please refer to my Arch System Installation Guide, here:
gcchaan /
Last active Oct 2, 2020
troposphere runner
set -ef -o pipefail
function message(){
echo 🍣 "$1"
function help(){
View Raspberry Pi - Linux OpenVPN Tutorial.txt
RaspberryPi OpenVPN Tutorial by []
These instructions should also be suitable for any recent OpenVPN installation, on any Linux disto - modify accordingly.
NOTE: Copy'n'paste anything between quotes below - but not the quotes, and only if it is preceeded by the word run!
I've assumed you are logged in to your RaspberryPi as the pi user.
Instructions where brackets [like-this] are used means, choose your own value.
0xjac /
Last active Apr 10, 2021
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare
mgoodness /
Last active Mar 25, 2021
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)

AWS Service annotations

  • (in minutes)
  • (true|false)
  • (comma-separated list of key=value)
  • (http|https|ssl|tcp)
  • (true|false)
brandonmwest / example.cs
Last active Mar 28, 2021
Generating base64-encoded Authorization headers in a variety of languages
View example.cs
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
string.Format("{0}:{1}", username, password))));