Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View milesmatthias's full-sized avatar

Miles Matthias milesmatthias

View GitHub Profile
@milesmatthias
milesmatthias / sd_to_gcloud.rb
Created January 4, 2020 00:20
Stackdriver UI to gcloud command
#!/usr/bin/env ruby
# HOWTO:
# 1. Copy your filters from the SD log UI
# 2. Run `pbpaste | ruby sd_to_gcloud.rb`
query=[]
ARGF.each_line do |line|
query.push line.gsub("\n", "").gsub("\"", "")
@milesmatthias
milesmatthias / Dockerfile
Last active April 1, 2019 18:26
miles dev image
FROM ubuntu:latest
RUN apt-get update && apt-get -y upgrade && apt-get install sudo
RUN useradd -ms /bin/bash mmatthias && mkdir -p /home/mmatthias/.ssh && \
echo "mmatthias ALL=(ALL) NOPASSWD:ALL" | tee -a /etc/sudoers
RUN apt-get install -y git curl netcat redis-server \
openjdk-8-jdk python python3.7 vim

Keybase proof

I hereby claim:

  • I am milesmatthias on github.
  • I am milesm (https://keybase.io/milesm) on keybase.
  • I have a public key ASBiXn_EfAqCVbq5MbTQAS-NE0allEqJs9xlVTjAK-itggo

To claim this, I am signing this object:

@milesmatthias
milesmatthias / build_and_deploy.sh
Created October 6, 2015 21:36
Gulp Build & Netlify deploy script
#!/bin/sh
#
# Usage: ./build.sh staging|production
#
stage=$1
git_branch=`git rev-parse --abbrev-ref HEAD`
@milesmatthias
milesmatthias / events.md
Last active August 29, 2015 14:20
Boulder Startup Week Development Track

Infrastructure & Architecture Design

Monday, 3:30pm - 4:30pm @ Boomtown;

With all of the powerful cloud services out there nowadays, it's more important than ever to give good thought about architecture when building your applications. This event has 3 awesome speakers who have experience in architecture design and will share their expertise and answer your questions about how to decide what infrastructure tools to use on your next project.

Dev Happy Hour

Tuesday, 4pm - 5pm @ Lyfe Kitchen

@milesmatthias
milesmatthias / remove_s3_object.rb
Created November 13, 2014 19:25
simple ruby script to remove an object from s3. requires having the aws gem installed.
#!/usr/bin/env ruby
##
# usage: AWS_SECRET_KEY=xxx AWS_ACCESS_KEY=xxx S3_BUCKET_NAME=xxx ./remove_s3_object.rb file1.html file2.html
#
#
require 'aws'
require 'pry'
@milesmatthias
milesmatthias / invalidate_cf.rb
Created November 13, 2014 18:44
simple ruby script to invalidate cloudfront objects. requires having the aws gem installed.
#!/usr/bin/env ruby
##
# usage: AWS_SECRET_KEY=xxx AWS_ACCESS_KEY=xxx CF_DIST_ID=xxx ./invalidate_cf.rb file1.html file2.html
#
#
require 'aws'
require 'date'
require 'pry'
@milesmatthias
milesmatthias / slides.md.txt
Last active August 29, 2015 14:07
slides for intro_to_command_line gdi boulder (using mdp) (http://bit.ly/clgdi)
%title: intro_to_command_line
%author: milesmatthias.com
%date: 2014-09-21
# GDI upcoming events
#### Code & Coffee
October 18th. 10a - 1p
Amante Coffee Baseline - Boulder
@milesmatthias
milesmatthias / mv_contents_up.rb
Created October 6, 2014 00:02
short ruby script used to move movies in a file structure created by itunes into a flat structure
#!/usr/bin/env ruby
# for each directory in the current directory:
#
# 1. move its contents up one directory (out of its current directory)
# 2. remove the (now empty) directory
#
# ( note: skips hidden files and . and .. )
require 'pry'
@milesmatthias
milesmatthias / number_episodes.rb
Created October 5, 2014 23:22
A short ruby script I wrote to quicken the process of prefixing episodes with numbers on an external hard drive.
#!/usr/bin/env ruby
require 'pry'
require 'fileutils'
EPISODES = [
nil,
nil,
nil,
"My Happy Place.mov",