Skip to content

Instantly share code, notes, and snippets.

View simplesessions's full-sized avatar
💭
Busy, busy, busy!

Charles Kihe simplesessions

💭
Busy, busy, busy!
View GitHub Profile
@simplesessions
simplesessions / gist:b1d1608a3b5a0595092a
Created August 28, 2015 02:47
Converting video to uncompressed AVI
ffmpeg -i "$in_file" -vcodec rawvideo -pix_fmt uyvy422 -vtag 2vuy -acodec $audio-codec "$out_file"
/* per http://stackoverflow.com/questions/20590239/maintain-aspect-ratio-of-div-but-fill-screen-width-and-height-in-css */
div {
width: 100vw;
height: 56.25vw; /* height:width ratio = 9/16 = .5625 */
background: pink;
max-height: 100vh;
max-width: 177.78vh; /* 16/9 = 1.778 */
margin: auto;
position: absolute;
top:0;bottom:0; /* vertical center */
@simplesessions
simplesessions / gist:6eb91786e21dc2a77917
Created December 30, 2015 22:12
ffmpeg web video settings
# per http://asisolve.com/ffmpeg-encoding-settings-for-web-video/
ffmpeg -i [path-to-video] -vcodec libx264 -preset slow -profile main -crf 25 -acodec libfdk_aac -ab 64k [new-video-name].mp4
@simplesessions
simplesessions / gist:7f614be80fafe9cd3bf3
Created January 25, 2016 20:23
libv8 + therubyracer sucks
brew install homebrew/versions/v8-315
brew link --overwrite v8-315 --force
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -v '0.12.2' -- --with-system-v8
### XCode
echo "Installing XCode Tools"
xcode-select --install
### Homebrew
echo "Installing Homebrew"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
### Git
brew install git
@simplesessions
simplesessions / delete.txt
Created March 9, 2016 22:05
Linux: Super fast delete
# based on http://www.stevekamerman.com/2008/03/deleting-tons-of-files-in-linux-argument-list-too-long/
ls -1 | wc -l && time find . -type f -delete
@simplesessions
simplesessions / wordpress-ubuntu_1604-nginx_mainline.sh
Last active March 15, 2018 18:50
Install PHP7 FPM, nginx mainline, mariaDB, iptables, Wordpress, WP-CLI
#### BEFORE USING THIS, CHANGE ALL THE VALUES BETWEEN DOUBLE-SQUARE-BRACKETS ####
# SEE THE END OF THIS FOR REFERENCES
# YOU SHOULD BE ABLE TO COPY AND PASTE THE FOLLOWING LINES,
# BUT CHUNK IT OUT BY THE # ===== separators
# PERFORM AS ROOT UNLESS OTHERWISE SPECIFIED
# ===== BEGIN INITIAL SETUP
@simplesessions
simplesessions / .bash_profile
Last active April 2, 2018 10:20
Bash Profile
# Some config taken from https://natelandau.com/my-mac-osx-bash_profile/
# ---------------------------------------------------------
# GENERAL: Exports
# ---------------------------------------------------------
export CLICOLOR=1 # add colors to the output
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx # ^
@simplesessions
simplesessions / sublime-settings.json
Created February 2, 2017 19:04
My Sublime Settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@simplesessions
simplesessions / .bashrc
Created March 14, 2017 21:57
Server bash.rc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac