Skip to content

Instantly share code, notes, and snippets.

View arch-setup.sh
#!/bin/sh
# VirtualBox
pacman -Sy virtualbox-guest-utils
systemctl enable
# Network setup
pacman -Sy dhcpcd
@BigAl
BigAl / githubstuff.md
Last active Mar 17, 2021
Github stuff
View githubstuff.md

All the repos in an org

curl -s -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} https://api.github.com/orgs/${GITHUB_ORG}/repos\?type\=all | jq -r '.[].clone_url'

curl -s -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} https://api.github.com/orgs/${GITHUB_ORG}/repos\?type\=all | jq -r '.[].ssh_url' | sort

View Bootable Windows USB from OSX.md
@BigAl
BigAl / getBlockLists.sh
Last active Jan 7, 2020 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*iblocklist.*\)'.*/\1/p"
| xargs curl -sL --compressed
| gunzip
| egrep -v '^#'
@BigAl
BigAl / awscliexample.md
Last active Dec 9, 2020
AWS CLI Examples
View awscliexample.md

Some AWS CLI commands I find useful

Subnets in a VPC

aws ec2 describe-subnets \
--filters "Name=vpc-id,Values=<VpcId>" \
--query 'Subnets[*].[VpcId,SubnetId,CidrBlock,MapPublicIpOnLaunch,AvailabilityZone,Tags[?Key==`Name`]|[0].Value]' \
--output text
@BigAl
BigAl / read-replica.yaml
Created Jan 18, 2019
AWS RDS Read Replica
View read-replica.yaml
AWSTemplateFormatVersion: '2010-09-09'
Metadata:
License: Apache-2.0
Description: 'Create Read Replica from the supplied MasterDBName'
Parameters:
MasterDBName:
Default: prod-9-6
Description: The database name or the MasterDB
Type: String
MinLength: '1'
View gist:9edff5c7e50bae582441fd10661ba556
# Makefile
COMMITID=$(shell git rev-parse HEAD)
ifndef AWS_DEFAULT_REGION
AWS_DEFAULT_REGION = $(shell aws configure get region)
endif
ifndef AWS_REGION
AWS_REGION = ${AWS_DEFAULT_REGION}
endif
@BigAl
BigAl / install_puppet.sh
Created May 16, 2017
Install puppet 4 CentOS
View install_puppet.sh
#!/bin/sh
echo "*****************************************"
echo " Installing puppet"
echo "*****************************************"
RELEASEVER=$(rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release))
yum install -y https://yum.puppetlabs.com/puppetlabs-release-pc1-el-${RELEASEVER}.noarch.rpm
yum install -y puppet-agent
View gist:23e259bbf7d9b85e5d3962c9e5df1a7c
https://www.youtube.com/watch?v=57qIiunuhaQ
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#configuring-the-external-url-for-gitlab
https://blog.mrtrustor.net/post/gitlab-on-k8s/
https://about.gitlab.com/downloads/#centos6
https://github.com/comerford/tf-aws-gitlab/blob/master/main.tf