Skip to content

Instantly share code, notes, and snippets.

View mikeflynn's full-sized avatar
🥪
A little hungry, but overall OK.

Mike Flynn mikeflynn

🥪
A little hungry, but overall OK.
View GitHub Profile
@mikeflynn
mikeflynn / aws-security-group.sh
Last active December 9, 2022 17:12
A bash script wrapper to better manage AWS EC2 security groups from the command line.
#!/bin/bash
# A script that wraps the aws-cli to automate the auditing of EC2 security groups
# Requires: https://aws.amazon.com/cli/ and https://stedolan.github.io/jq/
if [ -z $(which aws) ]; then
echo "ERROR: The aws-cli command is not installed or not in your path."
exit 1
fi
(require '[api.service.tools :as csv])
(require '[pipeline.youtube.api :as api])
(require '[api.channel :as c])
(require '[api.cms :as cms])
(defn foobar
[infile outfile country]
(->> (slurp infile)
(csv/csv-to-map)
(map #(assoc % :cms-name (->> (c/get :id (:id %) :fields [:cms])
:cms
@mikeflynn
mikeflynn / stltoday_paywall_bookmarklet.md
Last active January 22, 2022 16:44
STLToday Paywall Bookmarklet

The STLToday.com Paywall Busting Bookmarklet

To sneak past the STLToday paywall you need to do the following (I'm assuming you're using Google Chrome, but the same basics will work on any PC browser.)

  1. Go to STLToday.com

  2. Create a bookmark of that page.

  3. Edit the bookmark.

@mikeflynn
mikeflynn / keybase.md
Created August 31, 2018 16:43
keybase.md

Keybase proof

I hereby claim:

  • I am mikeflynn on github.
  • I am thatmikeflynn (https://keybase.io/thatmikeflynn) on keybase.
  • I have a public key ASDqiTuDgXFj_OtFiqtwyfuw_3FHV58xJcTWXZwn6ZAPvgo

To claim this, I am signing this object:

@mikeflynn
mikeflynn / record.sh
Last active December 28, 2016 21:08
A bash script to download video from Foscam cameras.
#!/usr/bin/env bash
# ./record.sh 192.168.77.51:8051 xxxxxx yyyyyy > /dev/null 2>&1
# Check input.
if [ -z "$1" ]; then
echo "Missing camera hostname."
exit 1
fi
@mikeflynn
mikeflynn / template.rss
Created June 29, 2016 22:29
RSS Feed Template
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
<channel>
<title>[LOL] DmPranksProductions from 20160601</title>
<description></description>
<link>http://www.spotify.com/</link>
<itunes:author>Studio71</itunes:author>
<itunes:images href="http://studio71-mrss-videos-baconlettucetomato.s3.amazonaws.com/studio71_square.tif"></itunes:images>
<item>
<guid isPermaLink="false">spf_-vfqSkrfhlw</guid>
@mikeflynn
mikeflynn / yt_crawler.go
Created March 14, 2016 07:30
YT Crawler
package main
import (
"log"
"net/http"
"regexp"
"strings"
"time"
"github.com/PuerkitoBio/gocrawl"
@mikeflynn
mikeflynn / site.mk
Last active June 19, 2019 05:39
Example Wordpress Makefile
include ../_global/wordpress.mk
wpconfig:
@./wp core config --dbname=example_site --dbuser=root --dbpass=root --path=./wordpress --skip-check;
theme:
@echo "Theme file found."
@unzip theme.zip -d wordpress/wp-content/themes
@mikeflynn
mikeflynn / hue.go
Last active October 5, 2015 07:07
Hue lights API in Go
package main
import (
"bytes"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
"strings"
)
@mikeflynn
mikeflynn / dashbutton_sniff.go
Last active October 5, 2015 06:04
The network sniffing functionality for the Amazon Dash Button hack.
func SnifferStart() {
// Get a list of all interfaces.
ifaces, err := net.Interfaces()
if err != nil {
panic(err)
}
var wg sync.WaitGroup
for _, iface := range ifaces {
wg.Add(1)