Skip to content

Instantly share code, notes, and snippets.

View nicerobot's full-sized avatar
🤖
☯️ ☮️ 🐶 🐾 👾 🎮 🎼 🎶 🕺 🎧 🌻 🌱 🏞 🌊 🌔 🌎

nicerobot nicerobot

🤖
☯️ ☮️ 🐶 🐾 👾 🎮 🎼 🎶 🕺 🎧 🌻 🌱 🏞 🌊 🌔 🌎
View GitHub Profile
@nicerobot
nicerobot / backup.sh
Last active April 15, 2022 23:13 — forked from joneskoo/gist-backup.py
Clone or update a user's gists locally
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3
@nicerobot
nicerobot / 0_reuse_code.js
Created December 14, 2013 00:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Parameters:
CIDRRange:
Description: VPCCIDR Range (will be a /16 block)
Type: String
Default: 10.251.0.0
AllowedValues:
- 10.250.0.0
- 10.251.0.0
Mappings:
VPCRanges:
Parameters:
VPCID:
Type: 'AWS::EC2::VPC::Id'
Description: Select Virtual Private Cloud ID
ELBSubnet:
Type: 'List<AWS::EC2::Subnet::Id>'
Description: Subnets for Elastic Loadbalancer
PrivateSubnets:
Type: 'List<AWS::EC2::Subnet::Id>'
Description: Subnets for RDS and EC2
@nicerobot
nicerobot / term_context.go
Created June 14, 2017 23:41 — forked from matryer/term_context.go
Making Ctrl+C termination cancel the context.Context
func main() {
ctx := context.Background()
// trap Ctrl+C and call cancel on the context
ctx, cancel := context.WithCancel(ctx)
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
defer func() {
signal.Stop(c)
@nicerobot
nicerobot / delete_all_object_versions.sh
Last active July 19, 2017 01:10 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
STARTD=${PWD}
SELFD=$(cd $(dirname ${0}) >/dev/null 2>&1; pwd)
SELF=$(basename ${0})
SELFN=$(basename ${SELFD})
SELFU=${SELF%.*}
SELFZ=${SELFD}/${SELF}
set -e
@nicerobot
nicerobot / README.md
Created January 5, 2018 06:05 — forked from miguelmota/README.md
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@nicerobot
nicerobot / bash.generate.random.alphanumeric.string.sh
Last active March 22, 2018 02:34 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
randomized() { cat /dev/urandom | tr -dc ${2:-"A-HJ-NP-Za-km-z2-9%^&*()_+?><~;"} | fold -w ${1:-32} | head -n 1; }
# LC_CTYPE=C supports macos. It is done in a subshell so as not to pollute the environment.
random_string() { echo $(export LC_CTYPE=C; randomized ${@}); }
random_hex() { random_string ${1:-4} 'a-f0-9'; }
random_hexu() { random_string ${1:-4} 'A-F0-9'; }
apiVersion: v1
kind: Service
metadata:
name: httpbin
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v0
kind: Mapping
name: httpbin_mapping
---
apiVersion: v1
kind: Service
metadata:
labels:
service: ambassador-admin
name: ambassador-admin
spec:
type: NodePort
ports: