Skip to content

Instantly share code, notes, and snippets.

Steve M shmick

  • Toronto
Block or report user

Report or block shmick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View 2019-12-17-scans
Timestamp RF Strnght Quality Symbol Virtual Name
------------------------------------------------------------------------
2019-12-16 00:04 41 100 100 100 41.1 CIII
2019-12-16 01:05 41 100 100 100 41.1 CIII
2019-12-16 02:05 41 100 100 100 41.1 CIII
2019-12-16 03:05 41 100 100 100 41.1 CIII
2019-12-16 04:05 41 100 100 100 41.1 CIII
2019-12-16 05:05 41 100 100 100 41.1 CIII
2019-12-16 06:05 41 100 100 100 41.1 CIII
2019-12-16 07:04 41 100 100 100 41.1 CIII
View pihole-compose.yml
version: "3"
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
View unifi-compose.yml
# $ cat docker-compose.yml
version: '2'
services:
unifi:
image: ryansch/unifi-rpi:latest
container_name: unifi
restart: always
network_mode: host
volumes:
# Unifi v5.0.7 creates all of these directories (some remain empty)
View docker with temp creds
Using the saml2aws utility, you can get a set of temporary AWS credentials that you can export to your docker container.
Use this command to put those credentials into a local environment file for docker:
$ saml2aws exec env | egrep 'AWS_(ACC|SECR|SES)' > env.file
Running command as: arn:aws:sts::123456789012:assumed-role/AWS-MyRole/username@globeandmail.com
You should now see AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN inside of env.file
Now start your container with the --env-file option, using the env.file you just created.
View docker with temp creds
Using the saml2aws utility, you can get a set of temporary AWS credentials that you can export to your docker container.
Use this command to put those credentials into a local environment file for docker:
$ saml2aws exec env | egrep 'AWS_(ACC|SECR|SES)' > env.file
Running command as: arn:aws:sts::123456789012:assumed-role/AWS-MyRole/username@globeandmail.com
You should now see AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN inside of env.file
Now start your container with the --env-file option, using the env.file you just created.
@shmick
shmick / config
Created Feb 13, 2019
~/.aws/config example
View config
# ~/.aws/config example
[profile org-master]
aws_access_key_id=AK...
aws_secret_access_key=AY...
region=us-east-1
[profile org-acctfoo]
role_arn = arn:aws:iam::111111111111:role/OrganizationAccountAccessRole
source_profile = org-master
@shmick
shmick / mute
Created Sep 18, 2018
Twitter mute words
View mute
suggest_recycled_tweet_inline
suggest_activity_tweet
suggest_recycled_tweet
suggest_recap
suggest_who_to_follow
suggest_activity
suggest_pyle_tweet
suggest_ranked_timeline_tweet
@shmick
shmick / boto3_sts_assumerole
Last active May 24, 2018
A quick example for using roles within a boto3 script
View boto3_sts_assumerole
import boto3
acct1_arn = 'arn:aws:iam::111111111111:role/S3-Write-Role'
acct2_arn = 'arn:aws:iam::222222222222:role/S3-Read-Role'
def switch_role(role_arn):
sts_client = boto3.client('sts')
response = sts_client.assume_role(
RoleArn=role_arn,
RoleSessionName="AssumeRoleSession"
View picoin.sh
#!/bin/bash
BASEURL="https://bitcoin.org/bin"
ARCH="arm-linux-gnueabihf"
VER=$(curl -s https://api.github.com/repos/bitcoin/bitcoin/releases | grep -m 1 tag_name | awk -F\" '{print $4}' | cut -c 2-)
DIR="bitcoin-core-$VER"
FILE="bitcoin-$VER-$ARCH.tar.gz"
FILEURL="$BASEURL/$DIR/$FILE"
SHA256HASH=$(curl -s $BASEURL/$DIR/SHA256SUMS.asc | grep $FILE | awk '{print $1}')
@shmick
shmick / verifyAkamaiIp.sh
Created Jan 24, 2017 — forked from rafaelfelix/verifyAkamaiIp.sh
Shell script to programmatically check if an IP address belongs to Akamai. Requires Akamai login, password and permission to access https://control.akamai.com/partner-tools/index.action?target=VerifyAkamaiIP
View verifyAkamaiIp.sh
#!/bin/bash
#
# Issue request to Akamai tool verifyAkamaiIpInternal to check if
# the given IP address belongs to Akamai
#
## defining helper functions first
# show usage
You can’t perform that action at this time.