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};
@emmanuelnk
emmanuelnk / displayAwsAccountAlias.js
Last active September 4, 2024 00:46
GreaseMonkey script to show an AWS account alias in the top nav bar
// ==UserScript==
// @name DisplayAWSAccountAlias
// @version 1
// @grant none
// @match https://*.console.aws.amazon.com/*
// ==/UserScript==
// Replace with your account numbers and desired alias
// The key is the account number and the value is the alias to display
const accountAliases = {
@SomeCallMeTom
SomeCallMeTom / install_mysql_client.sh
Last active July 26, 2024 16:44 — 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 September 20, 2024 01:47
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.