Skip to content

Instantly share code, notes, and snippets.

Dana Merrick dmerrick

Block or report user

Report or block dmerrick

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
View sync-consumer-group-offsets.sh
#!/usr/bin/env bash
env="stage"
region="us-west-2"
old_group="webhooks_"
new_group="webhooks"
topic="fulfillment-events"
View simple-server.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func handle(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
View nasa.rb
#!/usr/bin/env ruby
require 'pp'
require 'awesome_print'
# example_line = 'www-c8.proxy.aol.com - - [31/Aug/1995:23:59:52 -0400] "GET /icons/unknown.xbm HTTP/1.0" 200 515'
# line = example_line
results = {}
View solution.rb
#!/usr/bin/env ruby
require 'pp'
require 'open-uri'
require 'json'
input = "61.210841,-149.888735\nSan Francisco\n33132"
places = input.split(/\n/)
results = {}
View shortener.rb
#!/usr/bin/env ruby
require 'sinatra'
require 'pp'
# env.oy/<random_str>
$data = {}
def generate_random_string(length = 5)
View README.md

A Dana Life... Live on Twitch!

Welcome!

This is the source code to twitch.tv/ADanaLife_

It is composed of two parts:

  1. A Ruby script that generates a randomized playlist
  2. A Bash script that starts an ffmpeg process
@dmerrick
dmerrick / cleanup-ecr.rb
Last active Jan 9, 2019
Delete old ECR images
View cleanup-ecr.rb
#!/usr/bin/env ruby
# this script will delete ECR images that are older than N days
require 'date'
require 'json'
# customize this script
repo = 'snapdocs'
delete_if_older_than = 60 # days
View gravity-falls-decoder.rb
#!/usr/bin/env ruby
# this script takes a list of encoded words,
# and returns the decoded message. for example:
#
# gravity-falls-decoder.rb 4-16-19 11-23-10
#
#
# we'll start by setting up some important variables
View morgan.rb
#!/usr/bin/env ruby
input = {
foo: [ 1, 2],
bar: [ 3, 4]
}
num_args = input.values.first.size
output = []
View plaid-first-round.txt
[28,14,64]
[46,80,44]
[56,19,44]
[38,65,44]
[28,37,64]
[48,25,44]
[76,44,44]
[42,58,44]
[64,62,44]
[34,31,64]
You can’t perform that action at this time.