Skip to content

Instantly share code, notes, and snippets.

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

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

@BigAl
BigAl / getBlockLists.sh
Last active January 7, 2020 04:14 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
#!/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 December 9, 2020 01:35
AWS CLI Examples

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 January 18, 2019 04:44
AWS RDS Read Replica
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'
# 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 12:52
Install puppet 4 CentOS
#!/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
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