Skip to content

Instantly share code, notes, and snippets.

View marknca's full-sized avatar

Mark marknca

View GitHub Profile
@marknca
marknca / remove-opsworks-security-groups.sh
Last active March 27, 2023 15:29
Remove OpsWorks security groups from a given region
#! /usr/bin/env bash
# Remove OpsWorks security groups from the given region
# Available regions:
# ====================
# ap-northeast-1 => Asia Pacific (Tokyo) Region
# ap-southeast-1 => Asia Pacific (Singapore) Region
# ap-southeast-2 => Asia Pacific (Sydney) Region
# eu-west-1 => EU (Ireland) Region
@marknca
marknca / README.md
Last active August 26, 2022 18:21
Read multiple RSS feeds and write their entries as Hugo posts

Usage

List your feeds in a tab seperated value text file with the format;

Name of feed\tFEED_URL
Name of feed\tFEED_URL
Name of feed\tFEED_URL
@marknca
marknca / get_twitter_thread.py
Created September 4, 2021 20:15
Generate an HTML presentation of a Twitter thread given a specific tweet ID
#! /usr/bin/env python3
# Standard library
import datetime
import re
import sys
import time
# 3rd party library
import requests
@marknca
marknca / santa.py
Last active December 11, 2020 22:07
A quick Secret Santa generator. You can specify restrictions (e.g., don't let Larry draw Jen's name). Set the three TODO sections (line 14, line 17, and line 74) before running the script.
#! /usr/bin/env python
# Usage
# ===============================
# test run
# ./santa.py --test
#
# game time
# ./santa.py --password EMAIL
#
@marknca
marknca / user-data.sh
Created June 20, 2020 21:34
cloud-init for Super Feed updates
#! /usr/bin/env bash
sudo yum -y install git
sudo yum -y install python3
sudo pip3 install boto3
sudo pip3 install dateparser
sudo pip3 install feedparser
cat > /home/ec2-user/get_secret.py <<- PY_FILE
# Standard libraries
import base64
@marknca
marknca / requirements.sh
Created March 25, 2020 18:53
Setup Google Cloud Platform for python on macOS
pip3 install --upgrade google-cloud-bigquery
pip3 install --upgrade google-cloud-bigtable
pip3 install --upgrade google-cloud-datastore
pip3 install --upgrade google-cloud-dns
pip3 install --upgrade google-cloud-error-reporting
pip3 install --upgrade google-cloud-firestore
pip3 install --upgrade google-cloud-language
pip3 install --upgrade google-cloud-logging
pip3 install --upgrade google-cloud-monitoring
pip3 install --upgrade google-cloud-pubsub
@marknca
marknca / s02-e01-links.md
Last active March 24, 2020 16:43
#LetsTalkCloud Links