Skip to content

Instantly share code, notes, and snippets.

View fijimunkii's full-sized avatar
🦁
𐂃͠

Harrison Powers fijimunkii

🦁
𐂃͠
View GitHub Profile
@fijimunkii
fijimunkii / readme.md
Created December 19, 2017 21:54 — forked from max-mapper/readme.md
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@fijimunkii
fijimunkii / ffmpeg-watermark.md
Created December 19, 2017 21:54 — forked from webkader/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@fijimunkii
fijimunkii / nginx_gzip
Created October 20, 2017 14:56
nginx gzip conf
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/javascript application/xml;
gzip_disable "MSIE [1-6]\.";
@fijimunkii
fijimunkii / uri_encode.sh
Created October 13, 2017 17:08
bash uri encode
#!/usr/bin/env bash
# https://stackoverflow.com/a/7506695/2474735
set -e
set -u
set -o pipefail
echo `echo -ne "$1" | hexdump -v -e '/1 "%02x"' | sed 's/\(..\)/%\1/g'`
@fijimunkii
fijimunkii / max_expiry_cert.sh
Created October 6, 2017 17:17
max expiry / validity period for an x509 certificate
# https://groups.google.com/forum/#!topic/mailing.openssl.users/3kK_f0ywCZQ
openssl req -new -x509 -days 24855 -key ca.key -out ca.crt
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert
@fijimunkii
fijimunkii / bastion_host.yaml
Created September 15, 2017 15:44
simple bastion host cloud formation template
Description: Bastion Host for SSH access into ECS cluster v1.1
Parameters:
S3Bucket:
Description: S3 bucket name
Type: String
Default: bastion-host
S3Key:
Description: S3 object key
Type: String
Default: id_rsa
@fijimunkii
fijimunkii / cookie_reuse_express_request.js
Created May 4, 2017 15:48
Simple cookie reuse express request
@fijimunkii
fijimunkii / mouse.js
Created May 3, 2017 23:13 — forked from TooTallNate/mouse.js
Enable "mouse reporting" with Node.js
// Based on:
// http://groups.google.com/group/nodejs-dev/browse_thread/thread/a0c23008029e5fa7
process.stdin.resume();
process.stdin.on('data', function (b) {
var s = b.toString('utf8');
if (s === '\u0003') {
console.error('Ctrl+C');
process.stdin.pause();
@fijimunkii
fijimunkii / ssh_to_slack
Created March 28, 2017 22:54
announce ssh connections to slack
Slack Setup
So first you would need to configure an Incoming Web Hook in Slack:
https://YOUR_DOMAIN.slack.com/apps/manage/custom-integrations
Configuring this will give you a Webhook URL to which you can post your messages.
Machine Setup
Now connect to your machine and create a script in your ssh folder: