Skip to content

Instantly share code, notes, and snippets.

{
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34bf85}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@shtratos
shtratos / fetch-dev-secrets-from-vault.sh
Last active April 10, 2024 07:38
Bash script to fetch and store secrets from Azure KeyVault
#!/usr/bin/env bash
#
# Fetch secrets for local development from Azure KeyVault
# and print them to stdout as a bunch of env var exports.
# These secrets should be added to your local .env file
# to enable running integration tests locally.
#
KEY_VAULT=$1
function fetch_secret_from_keyvault() {
@Badgerati
Badgerati / Test-CronExpression.ps1
Last active April 13, 2023 21:53
PowerShell cron expression parser, to check if a date/time matches a cron expression
<#
.DESCRIPTION
PowerShell cron expression parser, to check if a date/time matches a cron expression
Format:
<min> <hour> <day-of-month> <month> <day-of-week>
.PARAMETER Expression
A cron expression to validate
.PARAMETER DateTime
@zish
zish / terraform_bash_completion.sh
Last active December 7, 2023 09:24
Better Terraform Bash Completion
# Bash Terraform completion
#
# Originally adapted from
# https://gist.github.com/cornfeedhobo/8bc08747ec3add1fc5adb2edb7cd68d3
#
# Author: Jeremy Melanson
#
# Features of this version:
# - Uses built-in bash routines for text processing, instead of external tools
# (awk, sed, grep, ...).
@mohnish
mohnish / Mintty.md
Last active February 23, 2024 17:03 — forked from appikonda/Mintty.md
Mintty Themes for Windows

Create .mintty folder with subfolder themes in c:\Users\< >

 Example:
 C:\Users\sandeep\.mintty\themes

Download '.minttyrc' files from https://github.com/iamthad/base16-mintty and add them to themes folder.

@halberom
halberom / efs_targets.j2
Last active May 18, 2023 10:22
ansible - example of using lookup and a template to generate dynamic list entries for modules
#jinja2:trim_blocks: True, lstrip_blocks: True
targets:
{% for privnet in all_private_subnets %}
- subnet_id: "{{ privnet }}"
security_groups: [ "{{ sg.group_id }}" ]
{% endfor %}
{% for pubnet in all_public_subnets %}
- subnet_id: "{{ pubnet }}"
security_groups: [ "{{ sg.group_id }}" ]
{% endfor %}
@rbq
rbq / docker.yaml
Last active October 19, 2023 11:57
Install Docker CE on Ubuntu using Ansible
---
- hosts: all
tasks:
- name: Install prerequisites for Docker repository
apt:
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key:
@RichardBronosky
RichardBronosky / README.MD
Last active April 26, 2024 08:21
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]) and works on Linux, macOS, Cygwin, WSL/WSL2

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable.

This project started as an answer to the StackOverflow question: [How can I copy the output of a command directly into my clipboard?][3]

@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r