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
RichardBronosky / delete-all-vpcs-in-region.sh
Created Dec 20, 2018 — forked from cjp/delete-vpc.sh
Delete AWS VPC including dependencies
View delete-all-vpcs-in-region.sh
#!/bin/bash -eu
#
# List all VPCs in region and delete them
main(){
if [ -z "$1" ]; then
echo "Usage: $0 <region> [<region> ...]"
exit 64
fi
@RichardBronosky
RichardBronosky / list-all-repos.py
Last active Jul 6, 2019 — forked from ralphbean/list-all-repos.py
Script to list all repos for a github organization
View list-all-repos.py
#!/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 list-all-repos.py 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
RichardBronosky / k8s-pi.md
Last active Nov 6, 2018 — forked from alexellis/k8s-pi.md
K8s on Raspbian
View k8s-pi.md

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

This is part of a blog post Serverless Kubernetes home-lab with your Raspberry Pis written by Alex Ellis.

Copyright disclaimer: Please provide a link to the post and give attribution to the author if you plan to use this content in your own materials.

Pre-reqs:

@RichardBronosky
RichardBronosky / rPi3-ap-setup.sh
Created Jul 4, 2018 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
View rPi3-ap-setup.sh
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@RichardBronosky
RichardBronosky / tmux.md
Last active Jun 28, 2018 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux [MINIMAL] cheat sheet

Objective

This is the minimum you should memorize to feel at home on any server your SSH into. There are many cheatsheets out there that try to be exhaustive, or suggest mapping shit to more convenient locations, but that is not the goal of this one. Everyone should use tmux for every connection, to every server, always. Memorizing this brings down the barrier to doing so.

Sessions, windows, panes

Session is a set of windows, plus a notion of which window is current.

View start-stop-daemon-example.sh
#!/bin/bash -e
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
NAME=blink
DIR=/home/pi
PIDFILE=/home/pi/$NAME.pid
DAEMON=/home/pi/pi_gpio_hack.py
DAEMON_ARGS="[[31,0,37,1],[31,1,37,0]]"
STOP_SIGNAL=INT
@RichardBronosky
RichardBronosky / adafruit.io
Last active Nov 27, 2017 — forked from deckerego/send_io.sh
Send Adafruit IO data using curl
View adafruit.io
#!/bin/bash
# Usage: AIO_KEY=key_hash FEED_KEY=name_of_feed VALUE=an_integer send_io.sh
# Specify any or none of the environment variables
aio_key="${AIO_KEY:-feedfacedeadbeef}" # default: replace everything after the -
feed_key="${FEED_KEY:-myfeedname}" # default: replace everything after the -
value="$(sed 's/"/\\"/g' <<<"${VALUE:-$(( ( RANDOM % 25 ) + 1 ))}")" # default: random int between 0 and 25
curl -H "X-AIO-Key: $aio_key" \
@RichardBronosky
RichardBronosky / 00README.md
Last active Nov 13, 2017 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
View 00README.md

How to use this

mkdir temp; cd temp
curl -LO https://gist.githubusercontent.com/RichardBronosky/33e4ce3b4718cd73162481804a33fe94/raw/SimpleHTTPServerWithUpload.py
python2 SimpleHTTPServerWithUpload.py 8080

or

mkdir temp; cd temp
wget https://gist.githubusercontent.com/RichardBronosky/33e4ce3b4718cd73162481804a33fe94/raw/SimpleHTTPServerWithUpload.py
@RichardBronosky
RichardBronosky / tmux.cheat
Last active Jan 8, 2018 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
View tmux.cheat
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@RichardBronosky
RichardBronosky / 0-TLDR.md
Last active Apr 17, 2019 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
View 0-TLDR.md

User 1

remote_server=172.31.0.1
git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/ > /tmp/git-serve.log 2>&1 &
ssh -R 9418:localhost:9418 ec2-user@$remote_server
git clone git://localhost/ local-repo-name

Repo from workstation is cloned onto server.

User 2

You can’t perform that action at this time.