Skip to content

Instantly share code, notes, and snippets.

@inkblot
inkblot / aws-credentials.sh
Last active January 23, 2025 23:00
Authenticate to vault using IAM instance profile credentials in bash using curl, openssl, and jq
#!/bin/bash
_SELF="${0##*/}"
_HERE="$(dirname $(realpath ${0}))"
function aws_instance_profile_arn() {
curl -s http://169.254.169.254/2019-10-01/meta-data/iam/info | jq -r .InstanceProfileArn
}
function aws_instance_profile_name() {
@dwightgunning
dwightgunning / template_tags.py
Created February 18, 2016 00:55
[Cactus] Revised 'static' template that supports a 'static-url' config key to enable an external static url
#coding:utf-8
import os
import logging
from django.template.base import Library
from django.conf import settings
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
logger = logging.getLogger(__name__)
@vadv
vadv / 1c.sql
Last active March 29, 2022 14:05
1c init db: dropdb test; createdb test; psql test -f 1c.sql -v ON_ERROR_STOP=1
SET SESSION default_with_oids = on;
SET client_min_messages=error;
SET lc_messages to 'en_US.UTF-8';
SET enable_mergejoin = off;
show standard_conforming_strings;