Skip to content

Instantly share code, notes, and snippets.

View ericcholis's full-sized avatar

Eric Cholis ericcholis

View GitHub Profile
@ericcholis
ericcholis / keybase.md
Last active September 14, 2018 12:45
keybase.md

Keybase proof

I hereby claim:

  • I am ericcholis on github.
  • I am ericcholis (https://keybase.io/ericcholis) on keybase.
  • I have a public key ASB_grT_1En2_YeHVYzs13CEliX3TcFB56WBtfw3A2nRSAo

To claim this, I am signing this object:

@ericcholis
ericcholis / mov2gif
Last active August 29, 2015 14:17 — forked from artursapek/mov2gif
#!/bin/bash
# mov2giv in out width
# mov2gif video_file_in.mov gif_file_out.gif 300
tmp_dir=/tmp/frames_$(date +%s)
mkdir $tmp_dir
if [ -z "$3" ]
then
size=600
#!/bin/sh
# http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
palette="/tmp/palette.png"
filters="fps=15,scale=460:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
@ericcholis
ericcholis / random-string
Created April 14, 2015 12:16
Random String Generator
#!/usr/bin/env bash
usage()
{
cat << EOF
usage: random-string
This script run the test1 or test2 over a machine.
OPTIONS:
@ericcholis
ericcholis / currency
Created April 14, 2015 12:17
Currency Conversion
#!/usr/bin/env bash
curl "http://www.xe.com/wap/2co/convert.cgi?Amount=$1&From=$2&To=$3" -A "Mozilla" -s | sed -n "s/.*>\(.*\) $3<.*/\1/p";
@ericcholis
ericcholis / nginx_install.sh
Last active January 27, 2017 23:49
Install nginx from source with nginScript
# nginx 1.9.5
# ubuntu trusty 14.04
apt-get update
apt-get upgrade
apt-get install build-essential mercurial libpcre3 libpcre3-dev libssl-dev
wget http://nginx.org/download/nginx-1.9.5.tar.gz
tar -xzvf nginx-1.9.5.tar.gz
@ericcholis
ericcholis / nginx_apt_modules.sh
Last active October 6, 2015 19:09
Install Mainline Nginx and add modules
readonly RELEASE=$(lsb_release -cs)
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
echo "deb http://nginx.org/packages/mainline/ubuntu/ $RELEASE nginx" >> /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ $RELEASE nginx" >> /etc/apt/sources.list.d/nginx.list
apt-get update
Verifying my Blockstack ID is secured with the address 17mGoUU32HVtJzHf6ujL4a9NyoThxuGg2U https://explorer.blockstack.org/address/17mGoUU32HVtJzHf6ujL4a9NyoThxuGg2U
@ericcholis
ericcholis / dnsmasq OS X.md
Last active October 19, 2023 16:21 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install