Skip to content

Instantly share code, notes, and snippets.

@nansenat16
nansenat16 / godaddy-ddns.txt
Last active November 7, 2023 13:08
RouterOS godaddy-ddns-update-script
#GoDaddy DDNS Update Script
#Test with RouterOS 6.45.2 (Minimum version RouterOS 6.44)
#Date:2019/08/02
#The read,write,policy,test that all of these policies need to be set in script for the global variable
#ref1 https://www.instructables.com/id/Quick-and-Dirty-Dynamic-DNS-Using-GoDaddy/
#ref2 http://www.minitw.com/post/2018/05/09/routeros-ddns-namecheap
#Easy Test
# /tool fetch url="https://api.godaddy.com/v1/domains/[domain]/records/A/[hostname]" http-method=put http-data="[{\"data\": \"10.10.10.10\"}]" http-header-field="content-type: application/json,Authorization: sso-key [API_KEY]:[API_SECRET]"
@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active April 22, 2024 11:24
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@GMZwinge
GMZwinge / packer.json
Created February 27, 2018 15:59
Sample Packer template for ESXi 6.0 or 6.5 and vCenter 6.5 that shows the entries uuid.bios and vc.uuid diseappearing from the .vmx file around the time the builder "vmware-iso" ends and the post processor "vsphere-template" starts, then reappear with different values some seconds later (10-15 in our case depending on hardware speed)
{
"builders": [
{
"type": "vmware-iso",
"remote_type": "esx5",
"remote_host": "{{user `esxi_host`}}",
"remote_username": "{{user `esxi_username`}}",
"remote_password": "{{user `esxi_password`}}",
"remote_datastore": "{{user `esxi_datastore`}}",
@turtlemonvh
turtlemonvh / RDS_markup.md
Created February 3, 2018 17:54
Compare the hourly price for RDS vs EC2 instances

RDS Pricing Markup

Looking at what the markup is on per-hour price of on-demand RDS instances vs on-demand EC2 instances.

See the python code for the analysis.

In the columns below

  • ec2 = base EC2 instances from us-east-1
  • p = RDS Postgres flavor
@chrisdiana
chrisdiana / export-cognito-users.sh
Last active March 18, 2024 09:38
Export AWS Cognito User Pool
# Export as Text Table
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output table > ~/users.txt
# Export as JSON
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output json > ~/users.json
# Export User Pool with more than 60 users (pagination)
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --pagination-token INCREDIBLYLONGSTRINGHERE --output json > ~/users-2.json
# Mikrotik script to update DuckDNS.org domain, to use it:
# - Download it as `duckdns-update`
# - Tune your `duckToken` and `duckDomain` variables
# - Copy it to your router:
# `scp duckdns-update user@you-router:`
# - Add the script
# `/system script add name=duckdns-update source=[ /file get duckdns-update contents ]`
# - Add a periodic task to execute it
# `/system scheduler add name=duckdns-updater interval=1h on-event=duckdns-update`
# - Or execute it manully
@ofrzeta
ofrzeta / preseed.cfg
Created November 26, 2015 12:15
Minimal preseed.cfg for network installation of Ubuntu 14.04 "Trusty Tahr"
d-i debian-installer/locale string en_US
d-i time/zone string Europe/Berlin
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string de
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string unassigned-domain
d-i mirror/country string manual
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active May 3, 2024 18:44
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@lantrix
lantrix / aws.sh
Last active July 25, 2023 03:06
Bash functions to autenticate and assume roles in aws federated accounts - for ADFS3
#!/bin/bash
# bash functions to autenticate and assume roles in aws federated accounts
# required tools on $PATH - aws, date, curl, jq, libxml2-utils
# requried environment variables:
export AWS_CLI=`which aws`
# optional environment variable, to automatically assume a specific role when calling assume()
# AWS_ASSUME_ROLE=arn:aws:iam::369407384105:role/cross-account-federated-role
#!/usr/bin/python
"""
Rackspace Cloud Files to S3 Migration
This script will copy the contents of a
Rackspace Cloud Files container
to an S3 bucket.