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
Verifying I am +waltspence on my passcard. https://onename.com/waltspence
@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 / ripo.sh
Created June 20, 2016 08:09
Download all repos from a user using bash. (Change the username value)
curl -s https://api.github.com/users/{username}/repos?per_page=200 | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["clone_url"])'
@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 / bashcommand.sh
Created June 21, 2016 02:58
RSS 2 JSON example
curl http://rss2json.com/api.json?rss_url=http://feeds.feedburner.com/alistapart/main > my.json
@waltspence
waltspence / Werwerwerwerk
Last active October 31, 2017 06:06
Create a project directory quickly in bash
alias werwerwerwerk="cd $HOME/Projects/current && mkdir werk_$(date +%F-%T)"