Skip to content

Instantly share code, notes, and snippets.

Avatar

Dana Merrick dmerrick

View GitHub Profile
View README.md

yt-album-combiner

This script is intended to take video a YouTube video and audio from another YouTube video and combine them into a new video.

Dependencies

apt install ffmpeg youtube-dl
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 Aug 23, 2020
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 = []
You can’t perform that action at this time.