Skip to content

Instantly share code, notes, and snippets.

Bruno Bronosky RichardBronosky

Block or report user

Report or block RichardBronosky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
RichardBronosky /
Last active Jun 11, 2019
A oneliner for testing redirects
# The following line defines a bash function and is designed to be copy-pasta-ed into your terminal and used as shown on the last line of this file. I'm only putting it in a script to get it on gist
redir_test(){ curl -svLo /tmp/redir_test.out "$@" 2>&1 | grep -E '^(> Host|> GET|< HTTP|< location|[<>]\s*$)'; }
# BONUS: One super-useful use of this is to test your readiness to respond to future DNS changes. That can be done like so:
# redir_test -H 'Host:'
# This assumes that your server at is set up to serve and this simulates what `curl` would do if DNS returned when doing a lookup on
redir_test "$@"
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""This module's docstring summary line.
This is a multi-line docstring. Paragraphs are separated with blank lines.
Lines conform to 79-column limit.
Module and packages names should be short, lower_case_with_underscores.
Notice that this in not
RichardBronosky /
Last active Jun 5, 2019 — forked from ralphbean/
Script to list all repos for a github organization
#!/usr/bin/env python2.7
""" Print all of the (git/ssh or http) urls for all repos (public or
private+public with personal_token) in a GitHub account (user or organization).
Usage example::
[HTTP_URLS=1] python2.7 account_name [personal_token]
It requires the pygithub3 module, which you can install on macos (Mac OSX) like this::
# get pip if you don't have it
RichardBronosky /
Last active May 28, 2019
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!


This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

RichardBronosky /
Last active May 26, 2019 — forked from jexchan/
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
#!/usr/bin/env python3
# taken from
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:4443
import http.server
RichardBronosky / aws
Last active May 23, 2019
A pattern for syncing a dir to AWS S3 using using only Docker
View aws
#!/bin/bash -eu
args=" -e \"AWS_DEFAULT_REGION=us-east-1\" ${DOCKER_ARGS:-} "
if [[ -n ${!v:-} ]]; then
args=" -e ${v}=${!v} ${args}"
#!/bin/bash -e
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
#!/usr/bin/env python
""" v0.2
Filter relocated lines from a unified diff format stream.
Offered under the terms of the MIT License at
Taken from
import sys
from optparse import OptionParser
RichardBronosky /
Last active May 10, 2019
Create a single-file "unified format" ovpn file from the legacy client.ovpn client.key client.crt ca.crt four-file format.

  1. cd to the directory where your 4 files are. (client.ovpn, client.key, client.crt, and ca.crt)

  2. Call with the filename of your ovpn file client.ovpn
  3. A new file named client_unified.ovpn will be created

You can’t perform that action at this time.