Skip to content

Instantly share code, notes, and snippets.

@cliv
cliv / userdata.txt
Created May 27, 2016 22:20
AWS UserData to configure Windows EC2 instance using powershell from S3 Raw
<powershell>
######
# Charlie Livingston <charlie@siplay.com>
# MIT Licensed - Do whatever you like with this.
#
# Simple code for a windows machine to grab a set of .ps1 files off of S3 and
# run them locally depengind on how a machine is tagged in EC2
#
# The xml-ish <powershell></powershell> tags in the script make the file invalid powershell to run directly in a machine
# but are required by EC2Config when passed into the instance as userdata
@joepie91
joepie91 / .md
Last active November 19, 2025 11:48
A *complete* listing of operators in Nix, and their predence.

Lower precedence means a stronger binding; ie. this list is sorted from strongest to weakest binding, and in the case of equal precedence between two operators, the associativity decides the binding.

Prec Abbreviation Example Assoc Description
1 SELECT e . attrpath [or def] none Select attribute denoted by the attribute path attrpath from set e. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return default if provided, otherwise abort evaluation.
2 APP e1 e2 left Call function e1 with argument e2.
3 NEG -e none Numeric negation.
4 HAS_ATTR e ? attrpath none Test whether set e contains the attribute denoted by attrpath; return true or false.
5 CONCAT e1 ++ e2 right List concatenation.
6 MUL e1 * e2 le
@jujhars13
jujhars13 / sftp.yaml
Last active November 20, 2024 00:30
kubernetes pod example for atmoz/sftp
apiVersion: v1
kind: Namespace
metadata:
name: sftp
---
kind: Service
apiVersion: v1
metadata:
@aasmith
aasmith / nested-json.sh
Created September 19, 2017 21:23
How to decode nested json with jq
# Typical use-case is decoding an AWS STS message. The DecodedMessage key contains escaped JSON.
jq '.DecodedMessage | fromjson | .' message.json
@istairbn
istairbn / Datadog-Installer.ps1
Created January 3, 2018 11:13
PowerShell script to automatically install the latest version of Datadog on a Windows Host
<#
.SYNOPSIS
This PowerShell script is designed to install the latest Datadog agent seamlessly on windows
.PARAMETER APIKey
The API Key for your datadog installation. Contact support if you don't have one!
.PARAMETER Location
Where the MSI should be dropped. Defaults to C:\Windows\temp
@shortjared
shortjared / list.txt
Last active August 21, 2026 09:14
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@sportebois
sportebois / ecr-add-tag.sh
Created March 29, 2018 18:55
Add tag to a docker image in ECR via AWS CLI
#!/usr/bin/env bash
function ecr-add-tag() {
if (( $# < 3 )); then
echo "Wrong number of arguments. Usage: ecr-add-tag ECR_REPO_NAME TAG_TO_FIND TAG_TO_ADD [AWS_PROFILE]"
return
fi
local repo_name=$1
local existing_tag=$2
local new_tag=$3
@jalaziz
jalaziz / 70-ec2-nvme-devices.rules
Last active October 31, 2025 20:57
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@rsp
rsp / GitHub-Project-Guidelines.md
Last active May 26, 2026 04:52
Git Strict Flow and GitHub Project Guidelines - setup rules and git flow for commercial and open-source projects by @rsp

Git Strict Flow and GitHub Project Guidelines

Or how to turn this:

into this: