Skip to content

Instantly share code, notes, and snippets.

View waltspence's full-sized avatar

Walt Spence waltspence

View GitHub Profile
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space
@waltspence
waltspence / shoot.sh
Created May 15, 2016 11:05 — forked from dhornbein/shoot.sh
Bash script that captures a screenshot, saves screenshot, optionally uploads it to Imgur.com, and injects URL to clipboard and meta data of saved file.
#!/bin/bash
#
# By Drew Hornbein @ http://dhornbein.com
#
# Modified from:https://github.com/Sirupsen/sirupsen.github.com/blob/master/static/misc/shoot
# By Sirupsen @ http://sirupsen.dk
#
# Description: Very simple script to make you
# select a region of your screen, which will be captured, saved, and
# then uploaded. The URL will then be injected into your clipboard.
@waltspence
waltspence / lets-encrypt.sh
Created May 16, 2016 21:09 — forked from sbeleidy/lets-encrypt.sh
SSL all the things
# Let's Encrypt SSL Setup
# Following the awesome tutorial from digitalocean's community:
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04
#####
sudo apt-get -y install git bc
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
sudo apt-get install nginx
sudo nano /etc/nginx/sites-available/default
# Add to server block:
# location ~ /.well-known {
@waltspence
waltspence / easyRTC.sh
Created May 16, 2016 21:10 — forked from sbeleidy/easyRTC.sh
Easy RTC setup with reTURN
#####
# Signalling Server Setup ex: EasyRTC
# See https://easyrtc.com/docs/guides/easyrtc_server_install.php
# This assumes you followed https://gist.github.com/sbeleidy/f4cd7e96dc0910dbc27cc6845d8b4d22 and
# https://gist.github.com/sbeleidy/3a23999d8e9e5da9adc6159c3742b42b for SSL and reTURN setup
#####
# Install node
sudo apt-get install nodejs
sudo apt-get install npm
@waltspence
waltspence / reTURN.sh
Created May 16, 2016 21:11 — forked from sbeleidy/reTURN.sh
reTURN setup
#####
# TURN Server Setup
# Requires SSL setup - see https://gist.github.com/sbeleidy/3a23999d8e9e5da9adc6159c3742b42b
#####
sudo apt-get update
sudo apt-get install resiprocate-turn-server
nano /etc/reTurn/reTurnServer.config
# Change TurnAddress to your public IP address
@waltspence
waltspence / webhooks.js
Created June 20, 2016 08:17 — forked from ryandotsmith/webhooks.js
Chain.com Webhooks Example
/*
Chain's Webhooks system will send an HTTP request
to our app with an event type of 'address-transaction'.
The body of the request will contain Chain's transaction
object. We can use this payload to do whatever we want!
*/
app.post('/', function (req, res) {
if (req.body['event'] == 'address-transaction') {
sendSMS(req.body.transaction)
res.send('OK\n');
@waltspence
waltspence / giphy.js
Created July 26, 2016 04:12 — forked from nealrs/giphy.js
use the giphy api to search for & add an animated gif to a webpage.
// on page load, search for & display a random gif matching your search term using the Giphy API.
// usage:
// include giphy.js in your <head>
// set q to your search term (e.g. "brunch")
// add <span id = "giphyme"></span> wherever you want to display the image. -- FYI, it will be centered.
// big ups to the Giphy crew (giphy.com)
// 2014 - Neal Shyam [@nealrs | nealshyam.com]
document.addEventListener('DOMContentLoaded', function () {
q = "finger guns"; // search query
@waltspence
waltspence / docker-wordpress.sh
Created August 12, 2016 07:35 — forked from tatemz/docker-wordpress.sh
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
my-wpdb:
image: mariadb
ports:
@waltspence
waltspence / .htaccess
Created November 29, 2016 03:07 — forked from CBeloch/.htaccess
Giphy - Random GIF by Tag
# Will allow to use a .gif extension.
# Script can now be used as www.mydomain.com/pokemon.gif
RewriteEngine on
RewriteRule ^(.*).gif giphy.php?tag=$1 [L,QSA]
@waltspence
waltspence / README.md
Created September 13, 2017 08:20 — forked from ControlledChaos/README.md
Remove plugin entries from the list on the WordPress Plugins page.

Remove Plugin Entries

WordPress Snippet