Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mike Flynn mikeflynn

🏠
Working from home
View GitHub Profile
@mikeflynn
mikeflynn / aws-security-group.sh
Last active Apr 8, 2021
A bash script wrapper to better manage AWS EC2 security groups from the command line.
View aws-security-group.sh
#!/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
View gist:e181b503f5c0ccf254bfc83025820036
(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 Jan 22, 2022
STLToday Paywall Bookmarklet
View stltoday_paywall_bookmarklet.md

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.

View 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 Dec 28, 2016
A bash script to download video from Foscam cameras.
View record.sh
#!/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 Jun 29, 2016
RSS Feed Template
View template.rss
<?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>
View yt_crawler.go
package main
import (
"log"
"net/http"
"regexp"
"strings"
"time"
"github.com/PuerkitoBio/gocrawl"
@mikeflynn
mikeflynn / site.mk
Last active Jun 19, 2019
Example Wordpress Makefile
View site.mk
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 Oct 5, 2015
Hue lights API in Go
View hue.go
package main
import (
"bytes"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
"strings"
)
@mikeflynn
mikeflynn / dashbutton_sniff.go
Last active Oct 5, 2015
The network sniffing functionality for the Amazon Dash Button hack.
View dashbutton_sniff.go
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)