Skip to content

Instantly share code, notes, and snippets.

@chauncey
chauncey / tm.sh
Created September 6, 2022 12:32
tmux-sh
#!/bin/sh
session="project"
tmux start-server
tmux new -d -s $session
tmux splitw -h -p 20
tmux selectp -t 1
tmux splitw -h -p 60
@chauncey
chauncey / GIF-Screencast-OSX.md
Created August 1, 2019 16:47 — forked from baumandm/GIF-Screencast-OSX.md
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 and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

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

# get the cert
openssl s_client -connect outlook.office365.com:993 -showcerts | openssl x509 -fingerprint -noout -md5
msmtp --serverinfo --host=<host> --tls=on --tls-certcheck=off
@chauncey
chauncey / aix_utils
Last active July 25, 2017 12:12
AIX utilities
# List of configurations with info on processers, memory, disks and logical volumes
prtconf
# List processors in the machine
/usr/sbin/lsdev -C -c processor
# Query directory size
du -sk * | sort -n
# Query volume size
@chauncey
chauncey / index.html
Created August 3, 2016 14:39
policy-search-api-2
<div class="site-wrapper">
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="inner cover"> <h1>Search</h1>
<p class="lead">
<a href="#" class="btn btn-lg btn-default" onclick="polsearch();">Search</a>
</p>
<div id="result">
</div>
</div>
@chauncey
chauncey / index.html
Created August 3, 2016 14:39
policy-search-api-1
<div class="site-wrapper">
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="inner cover"> <h1>Search for policies.</h1>
<p class="lead">
<a href="#" class="btn btn-lg btn-default" onclick="polsearch();">Policy Search</a>
</p>
<div id="result">
</div>
</div>
@chauncey
chauncey / keybase.md
Created January 12, 2015 19:51
keybase.md

Keybase proof

I hereby claim:

  • I am chauncey on github.
  • I am chauncey (https://keybase.io/chauncey) on keybase.
  • I have a public key whose fingerprint is 3D85 F1B1 BB4C E76E 2922 C63B 90ED 6CDA 49E7 C155

To claim this, I am signing this object:

@chauncey
chauncey / Gifify.zshrc
Last active August 29, 2015 14:11 — forked from SlexAxton/.zshrc
Gif generation
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@chauncey
chauncey / convert.sh
Last active October 24, 2016 07:30
OpenSSL
# Convert from p12 format to crt with OpenSSL
openssl pkcs12 -in keyname.p12 -nocerts -out keyname.privatekey.key
openssl pkcs12 -in keyname.p12 -clcerts -nokeys -out keyname.crt
@chauncey
chauncey / git-2.6.3.sh
Last active January 5, 2016 14:12
AIX 5.3 compile Git
[chauncey@]$ cat config.mak
# git Makefile configuration, included in main Makefile
# @configure_input@
CC = gcc
CFLAGS = -I/usr/chris/include -I/usr/local/openssl-1.0.1j/include -I/usr/local/include -I/opt/freeware/include
CPPFLAGS = -I/usr/chris/include -I/usr/local/openssl-1.0.1j/include -I/usr/local/include -I/opt/freeware/include
LDFLAGS = -L/usr/chris/lib -L/usr/local/openssl-1.0.1j/lib -L/usr/local/lib -L/opt/freeware/lib
AR = /usr/bin/ar
TAR = /usr/chris/bin/tar