Skip to content

Instantly share code, notes, and snippets.

View waltspence's full-sized avatar

Walt Spence waltspence

View GitHub Profile
@waltspence
waltspence / clone-all-twitter-github-repos.sh
Created March 9, 2022 04:53 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@waltspence
waltspence / sed cheatsheet
Created March 28, 2018 10:31 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@waltspence
waltspence / install_php.sh
Created March 26, 2018 11:32 — forked from theodorosploumis/install_php.sh
Install php7 with useful extension on Ubuntu xenial 16.10
sudo apt-get purge php5-common -y
#sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y
sudo apt-get install -y \
php \
libapache2-mod-php \
php-fpm \
php-mysql \
php-memcached \
php-pear \
@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

@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 / 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 / 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 / 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 / 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 / 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