Skip to content

Instantly share code, notes, and snippets.

View Sonic0's full-sized avatar
🦄
I'm eating Unicorns

Andrea Salvatori - IU6FZL Sonic0

🦄
I'm eating Unicorns
View GitHub Profile
@se1983
se1983 / main.rs
Last active March 20, 2024 10:35
#![no_std]
#![no_main]
use arduino_hal::hal::port::{PD3, PD5, PD6};
use arduino_hal::pac::TC0;
use arduino_hal::port::mode::{Analog, Input, Output, PwmOutput};
use arduino_hal::port::{mode, Pin, PinOps};
use arduino_hal::prelude::*;
use arduino_hal::simple_pwm::{IntoPwmPin, PwmPinOps, Timer0Pwm, Timer2Pwm};
use arduino_hal::{DefaultClock, Peripherals, Pins, Usart};
@SomeCallMeTom
SomeCallMeTom / install_mysql_client.sh
Last active May 17, 2024 08:49 — forked from sshymko/install_mysql_client.sh
Install MySQL 8.0 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo yum install -y mysql-community-client
@netstx
netstx / route53_iam_certbot_policy
Created March 2, 2021 21:13
AWS Route53 IAM policy for CertBot DNS verification
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"route53:GetHostedZone",
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets"
@ellemenno
ellemenno / aws-session
Last active July 7, 2022 14:17 — forked from ogavrisevs/aws-temp-token.sh
Script to retrieve temp auth token from AWS STS
#!/bin/bash
# Uses AWS CLI and user-provided MFA code to retrieve and store
# temp session credentials from AWS Security Token Service (STS),
# - for user sessions via get-session-token
# - or role sessions via assume-role
#
# Stores 'token_expiration' in the profile to enable checks on session time left
#!/usr/bin/env bash
#####################################################
# Author: Shinichi Okada
# Version : v0.0.3
# Date: 2021-03-20
#####################################################
# Clean up
unset FROM TO dir_name
@moreati
moreati / .ssh_config
Last active April 16, 2023 01:40
Playing Guess Who with Ansible
Host rpi1
HostName raspberrypi1.local
User pi
Host rpi2
HostName raspberrypi2.local
User pi
@LukeMathWalker
LukeMathWalker / audit.yml
Last active July 2, 2024 15:09
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
#!/bin/bash
set -e
set -o pipefail
echo "Start validation $1"
BRANCH=$(git branch -r --contains ${GITHUB_SHA} | grep "")
RELEASE_VERSION=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g" | sed -e "s/\//-/g")
@fsaravia
fsaravia / What's My IP.md
Last active December 15, 2023 14:49
What's My IP for AWS (Golang)

What's My IP for AWS Lambda

This is a Go script that can be deployed to AWS Lambda and returns the caller's IP address formatted in JSON.

@haranjackson
haranjackson / https_s3_website.sh
Last active June 13, 2024 21:09
An AWS CloudFormation template for a static website hosted on S3, served over HTTPS with CloudFront. "www." redirects to the naked domain.
DOMAIN= # insert your domain here (e.g. example.com)
STACK= # choose a name for your stack
REGION=us-east-1 # the ACM certificate must be in us-east-1
aws cloudformation deploy --template-file https_s3_website.yaml \
--stack-name $STACK \
--region $REGION \
--parameter-overrides DomainName=$DOMAIN
# push the website source to the s3 bucket - assuming it is contained in src/