Skip to content

Instantly share code, notes, and snippets.

@TomA-R
TomA-R / temp.css
Created June 25, 2022 08:02
temp.css
@charset "UTF-8";[contenteditable=true]:focus,[href]:focus,[tabindex]:not([tabindex="-1"]):focus,button:focus,details:focus,input:focus,select:focus,textarea:focus{outline:2px solid #0f7fff!important;outline-offset:1px!important}input:focus+label{outline:2px solid #0f7fff!important;outline-offset:1px!important}meta.foundation-version{font-family:"/5.5.3/"}meta.foundation-mq-small{font-family:"/only screen/";width:0}meta.foundation-mq-small-only{font-family:"/only screen and (max-width: 551px)/";width:0}meta.foundation-mq-medium{font-family:"/only screen and (min-width:551px)/";width:551px}meta.foundation-mq-medium-only{font-family:"/only screen and (min-width:551px) and (max-width:801px)/";width:551px}meta.foundation-mq-large{font-family:"/only screen and (min-width:801px)/";width:801px}meta.foundation-mq-large-only{font-family:"/only screen and (min-width:801px) and (max-width:1261px)/";width:801px}meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:1261px)/";width:1261px}meta.foundation-mq-xl
@TomA-R
TomA-R / poolMetadata.json
Created July 8, 2021 11:22
poolMetadata.json
{ "name": "Sunshine Stake Pool", "description": "Bringing sunshine to your ADA", "ticker": "SHINE", "homepage": "https://sunshinestake.com" }
@TomA-R
TomA-R / keybase.md
Last active April 2, 2022 07:22
keybase.md

Keybase proof

I hereby claim:

  • I am toma-r on github.
  • I am tomarbesser (https://keybase.io/tomarbesser) on keybase.
  • I have a public key ASC2l4pX-nlJPpg7V8_SERnbsAGBZC8HwVK1Qvwe2S2i6Ao

To claim this, I am signing this object:

@TomA-R
TomA-R / clean-beanstalkd.sh
Created July 16, 2018 23:59
Purge beanstalkd tubes
# clean-beanstalkd.sh
#!/bin/bash
echo "list-tubes" | nc -C beanstalkd.host.example 11300 | grep pattern-example[0-9]-xyz | awk '{ print $2 }' > process-tubes.txt
while [ -s process-tubes.txt ]
do
while read line; do ./beanstalk-purge beanstalkd.ec2.edminfra.com 11300 $line 2; done < process-tubes.txt
echo "list-tubes" | nc -C beanstalkd.ec2.edminfra.com 11300 | grep [0-9].ssm-i | awk '{print $2}' > process-tubes.txt
done;
@TomA-R
TomA-R / getinstances.py
Created July 12, 2018 07:55
Print EC2 instances by tag value
#!/usr/bin/python
# Used on bastion host (jumpbox)
# e.g.: for feedserver in $(/usr/bin/getinstances feed-server); do echo $feedserver; ssh $feedserver; done;
# @todo: make VPC detection automatic
import sys
import json
import subprocess
@TomA-R
TomA-R / install-redis.sh
Last active May 9, 2018 01:09
Install Redis stable
#!/bin/bash
# Dependencies
yum install -y tcl
# Download and extract source code
cd /usr/local/src
wget http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
rm -f redis-stable.tar.gz
@TomA-R
TomA-R / packer-iam-policy.json
Created April 12, 2018 06:02
Packer Amazon AWS IAM policy permission document
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CopyImage",
"ec2:CreateImage",
#!/bin/sh
#
# beanstalkd - a simple, fast workqueue service
#
# chkconfig: - 57 47
# description: a simple, fast workqueue service
# processname: beanstalkd
# config: /etc/sysconfig/beanstalkd
#
@TomA-R
TomA-R / ec2-instance-subnet-id.md
Created November 15, 2017 05:02 — forked from samkeen/ec2-instance-subnet-id.md
Get the subnet and VPC id of a running EC2 instance

First get the Interface mac address, then use that to run the full command

INTERFACE=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/)
SUBNET_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/subnet-id)
VPC_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${INTERFACE}/vpc-id)

echo $SUBNET_ID
1 x Uno R3 board +1 x USB cable
1 x Uno R3 Extension baord + 1 x GPIO Extension Board + 1 x Connecting Cable
1 x Breadboard
1 x Mini Breadboard
10 x 3mm Red LEDs
10 x 3mm Green LEDs
10 x 3mm Yellow LEDs
1 x 5mm RGB LED
5 x Button
20 x (330 ohm + 1k ohm +10k ohm)resistor