Skip to content

Instantly share code, notes, and snippets.

Kevin Ashcraft kevashcraft

Block or report user

Report or block kevashcraft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kevashcraft /
Last active Oct 17, 2019
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.



We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
kevashcraft /
Created Jul 11, 2019
Create ico from png
convert logo.png -define icon:auto-resize=64,48,32,16 logo.ico
View ad-muter.js
function mv() {
var found_one = false
var primary = 0
let el = document.querySelectorAll('.mlbtv-media-player')[primary]
let has_ads = !!el.querySelector('.interruption-link')
if (!has_ads) {
el.querySelector('video').muted = false
kevashcraft / daily_backup
Last active Dec 2, 2018
Recursive backup w rsync - bash script
View daily_backup
#Todays date in ISO-8601 format:
DAY0=`date -I`
#Previous backup date:
kevashcraft /
Created Jun 18, 2018
Retrieve Stock Market Data from the AlphaVantage API
from urllib.request import urlopen
import yaml
def retrieve(symbol=None):
with open('config.yml') as f:
config = yaml.load(f)
params = {
'function': 'TIME_SERIES_DAILY',
'symbol': symbol,
kevashcraft /
Last active Jan 19, 2018
Setup WordPress with Docker-Compose on CoreOS

Setup WordPress with Docker-Compose on CoreOS

Setup Steps

  1. Create docker-compose.yml in /home/core/, replacing the $variables with your values
  2. Create nginx.tmpl in /var/lib/docker/volumes/wpserver_nginx_templates/_data/
  3. Create wp-server.service in /etc/systemd/system/
  4. Run sudo systemctl daemon-reload to load the new service file
  5. Run sudo systemctl start wp-server to start the WordPress Server
  6. Run sudo systemctl status wp-server to make sure everything is running
kevashcraft / docker-compose-coreos
Last active Jan 19, 2018
Docker Compose Run as Container
View docker-compose-coreos
docker run \
-it \
-v $(pwd):/config \
-v /var/run/docker.sock:/var/run/docker.sock \
docker/compose:1.18.0 \
-f /config/docker-compose.yml up
kevashcraft / addsite
Last active Jun 20, 2017
Create a WordPress Site with WP CLI
View addsite
# addsite
# a bash script to create a new directory, download wordpress, create the database and user, and create wp-config and the initial site install with wp cli
# by Kevin Ashcraft (@kevashcraft)
# last updated on November, 8th 2014
# * expects a template file at /etc/nginx/conf.d/template
# * expects wp cli executable as wp
# * expects that this is not really just a dream
kevashcraft / backup
Created Mar 16, 2016
Kevin's Bash Backup Program
View backup
# Kevin's BASH Backup Program
# - runs every $interval
# - at midnight moves most recent to daily folder
# - on first day of the week moves most recent to weekly folder
# - on first day of the month moves most recent to monthly folder
# - deletes oldest interval backups after $keepinterval
View file-upload.js
fileUpload: function(e,d,o) {
if(this.$.upfile.value == null) return;
this.fileUploading = true;
var formData = new FormData();
formData.append('upfile', this.$.upfile.files[0], this.$.upfile.value );
var xhr = new XMLHttpRequest();'POST', '/jaxson/proposals/file_upload?token=' + BPC.user.token, true);
xhr.onload = function(e) {
You can’t perform that action at this time.