Skip to content

Instantly share code, notes, and snippets.

@slowpeek
slowpeek / bye.sh
Last active June 4, 2022 00:52
bye.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
##############################################################
##############################################################
## THIS GIST IS OBSOLETE AND IS NO LONGER UPDATED.
## Use here-bye instead: https://github.com/slowpeek/here-bye
#!/bin/bash
# This is a script that unsubscribes an email address from AWS junk mail.
# If the script breaks it might be the magic numbers that needs to change.
# Send the form while tracing the request in your browser to find the new values.
# https://pages.awscloud.com/communication-preferences
unsubscribe_aws_email() {
curl "https://pages.awscloud.com/index.php/leadCapture/save2" \
-H "Accept: application/json" \
@Siemko
Siemko / snip.code-snippets
Created June 3, 2020 19:19
"Print to console"
{
"Print to console": {
"scope": "javascript,typescript",
"prefix": "log",
"body": ["console.log('$1');"],
"description": "Log output to console"
}
}
@AlainODea
AlainODea / README.md
Last active March 25, 2024 23:39
Terragrunt config to auto-generate provider and backend config so you can apply library modules directly in infrastructure-live without an adapter module in infrastructure-modules

Using Terragrunt generate for extra DRY Terraform

Terragrunt config to auto-generate provider and backend config so you can apply library modules directly in infrastructure-live without an adapter module in infrastructure-modules.

@snixon
snixon / security-group-cleanup.py
Last active August 25, 2022 18:08 — forked from TomRyan-321/security-group-cleanup.py
Fancy Security Group Cleanup
#!/usr/bin/env python
import os
import boto3
import argparse
import json
# `pip install -U PTable` will get you the right fork of PrettyTable
from prettytable import PrettyTable
from botocore.exceptions import ClientError
@bitsurgeon
bitsurgeon / nvidia.md
Last active April 27, 2024 16:48
install Nvidia driver on Ubuntu with Secure Boot

Install Nvidia Driver on Ubuntu 18.04.3

Secure Boot

This section applies to machines with Secure Boot, such as ThinkPad.

  1. Before installation, switch to "Discrete Graphics" in BIOS, if both Intel and Nvidia graphics are present.
  2. During installation, make sure to select the "Install third-party software for graphics and Wi-Fi hardware and addition media formats" in "Updates and other software" screen.
  3. Select "Configure Secure Boot", and set password.
  4. Continue Ubuntu installation as normal.
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@aksakalli
aksakalli / install-conda.yml
Created July 18, 2018 10:08
Installing Minicaonda/Anaconda from Ansible playbook for all
- name: Install Conda
block:
- name: Download Miniconda
get_url:
url: https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
dest: /tmp/install-miniconda.sh
checksum: md5:a946ea1d0c4a642ddf0c3a26a18bb16d
mode: 0550
- name: Create conda folder
@Neo23x0
Neo23x0 / audit.rules
Last active January 13, 2024 14:12
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/