Skip to content

Instantly share code, notes, and snippets.

View dmfigol's full-sized avatar

Dmitry Figol dmfigol

View GitHub Profile
@TheDanBlanco
TheDanBlanco / deletion-policy.yaml
Last active October 6, 2023 20:43
Deletion Policy condition example
Parameters:
Environment:
Type: String
Default: dev
Description: Environment name, e.g. dev, test, prod
Conditions:
IsProd: !Equals [!Ref Environment, "prod"]
Resources:
@reegnz
reegnz / README.md
Last active January 30, 2025 11:26
The Terraform group_by you've been missing

The Terraform group_by you've been missing

I'm playing around a lot nowadays with Terraform 0.13 and I found a really interesting feature and that's the ... symbol (also called an ellipsis) to be used with for expressions.

The operator can be used for group_by operations.

Example

We have a list of entries. The list contains employee/manager/project triplets.

@richardg867
richardg867 / AppCenter.reg
Last active October 1, 2024 10:31
Stops the "APP Center" utility included with Gigabyte motherboards from asking you to update Chrome with an outdated version. Also removes the Norton and Google Toolbar bundleware offers from the app list. Requires a reboot to take effect. Registry keys and Chrome version comparison bug discovered by reverse engineering DrvUpd.exe
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\DownloadCenter]
[HKEY_LOCAL_MACHINE\SOFTWARE\DownloadCenter\Sub]
"Google Chrome (R) a faster way to browse the web"="9223372036854775807"
"Google Drive"="9223372036854775807"
"Google Toolbar for Internet Explorer"="9223372036854775807"
"Norton Internet Security(NIS)"="9223372036854775807"
@pydanny
pydanny / django_local_settings.py
Last active December 12, 2018 12:31
running local unverified SSL on Django and Flask (don't do this in production!!!)
from .common import * # noqa
DEBUG = True
INSTALLED_APPS += ('django_extensions',)
# Snip all the other stuff
@koop
koop / ensure-cert-macos.sh
Created November 28, 2017 20:27
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.