Skip to content

Instantly share code, notes, and snippets.

View theseanything's full-sized avatar

Sean Rankine theseanything

  • London
  • 23:48 (UTC +01:00)
View GitHub Profile
@theseanything
theseanything / copy_sm_secrets.py
Last active June 23, 2022 12:43 — forked from sgtoj/copy_sm_secrets.py
Python script to copy AWS SecretsManager Secrets
#!/usr/bin/env python3
import argparse
import os
import boto3
from botocore.exceptions import ClientError
# -------------------------------------------------------------------- main ---
Cop Name Offenses Auto-correctable Enable Notes
Naming/VariableNumber 401 No Extended in v1.2 to handle method names and symbols.
---
defaults:
features: &default_features
- title
- base_path
- summary
- body
tags: &default_tags
- primary_publishing_org
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
@theseanything
theseanything / setup.sh
Last active December 14, 2018 15:25 — forked from bradp/setup.sh
New Mac Setup Script
echo "Installing xcode-stuff"
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

Keybase proof

I hereby claim:

  • I am theseanything on github.
  • I am theseanything (https://keybase.io/theseanything) on keybase.
  • I have a public key ASBIEO2J8YOzz6IvAKfftB-Nn_lGfXplKjtG1oZxoxvExQo

To claim this, I am signing this object:

@theseanything
theseanything / Issue.swift
Created May 4, 2018 19:51
Custom decoder for Vapor Model
import FluentSQLite
import Vapor
/// A single entry of a Issue list.
final class Issue: SQLiteModel {
/// The unique identifier for this `Issue`.
var id: Int?
var title: String
var description: String
@theseanything
theseanything / http_database.py
Created August 21, 2017 23:25
HTTP server for an in-memory database
from http.server import HTTPServer, BaseHTTPRequestHandler, __version__
HOST = ''
PORT = 8080
class DatabaseHTTPRequestHandler(BaseHTTPRequestHandler):
"""Request handler for interacting with a in-memory database"""
database = {}