Skip to content

Instantly share code, notes, and snippets.

View RichardBronosky's full-sized avatar

Bruno Bronosky RichardBronosky

View GitHub Profile
@RichardBronosky
RichardBronosky / 00README.md
Last active November 13, 2017 21:43 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
@RichardBronosky
RichardBronosky / adafruit.io
Last active November 27, 2017 23:26 — forked from deckerego/send_io.sh
Send Adafruit IO data using curl
#!/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" \
#!/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 / tmux.md
Last active June 28, 2018 16:18 — forked from andreyvit/tmux.md
tmux cheatsheet

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.

@RichardBronosky
RichardBronosky / rPi3-ap-setup.sh
Created July 4, 2018 02:35 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/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 / k8s-pi.md
Last active November 6, 2018 09:19 — forked from alexellis/k8s-pi.md
K8s on Raspbian

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 / list-all-repos.py
Last active August 4, 2021 16:25 — forked from ralphbean/list-all-repos.py
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 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 / delete-all-vpcs-in-region.sh
Created December 20, 2018 22:48 — forked from cjp/delete-vpc.sh
Delete AWS VPC including dependencies
#!/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 / Fork your own Gist.md
Last active November 14, 2019 17:12 — forked from antichris/about.md
Fork your own Gist

Fork your own Gist

It used to be possible to fork your own gists via the browser using a little JS magic. This is no longer the case. As an alternative, you can use Chris Wanstrath's https://github.com/defunkt/gist cli tool to do the next best thing.

Usage

gist-fork git@gist.github.com:fcc543f7f1cfba404caf5ce276cc0951.git
@RichardBronosky
RichardBronosky / aws.setup-credentials.sh
Last active June 11, 2020 17:01 — forked from sobi3ch/aws.setup-credencials
After downloading default user accessKeys.csv file from AWS console you can setup default profile with following bash function
#!/bin/bash -eu
aws.setup-credentials(){
local FILE="${1:--/dev/null}"
local file_paths_to_check=(
"$FILE"
"./accessKeys.csv"
"$HOME/accessKeys.csv"
"$HOME/Downloads/accessKeys.csv"
)