Skip to content

Instantly share code, notes, and snippets.

View ambakshi's full-sized avatar

Amit Bakshi ambakshi

View GitHub Profile
@cg-soft
cg-soft / scheduler.groovy
Last active June 20, 2020 03:53
Dynamic Jenkins Job Scheduler
// Schedule builds TeamCity style: Given a dependency relationship between builds,
// start all builds whose prerequisite builds have completed.
// This is intended to be run as a system groovy script in Jenkins.
// Unbound variables:
// sleepSeconds - amount of time to sleep between polls. 5-15 seconds seem good.
// Every entry in the jobToRun map is expected to have this format:
// JobId: [ JobName: <actual jenkins name of the job>,
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active January 28, 2025 09:47
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@kwilczynski
kwilczynski / disable-ipv6.sh
Last active March 28, 2025 22:42
Amazon Linux OS tweaks
#!/bin/bash
set -u
set -e
set -o pipefail
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
cat <<'EOF' > /etc/modprobe.d/blacklist-ipv6.conf
@codekoala
codekoala / vault_intermediate_ca_setup.sh
Last active January 22, 2025 02:14 — forked from bhouse/vault_intermediate_ca_setup.sh
Setting Up Hashicorp Vault with an intermediate CA based on https://gist.github.com/jefferai/092d2cd728ff66089f17
#!/bin/bash -e
# Setup a Root CA in vault
# Generate and sign an Intermediate cert
#
# Requires:
# * A running vault server already initialzed and unsealed
# * Environment variable VAULT_TOKEN is set
# * vault cli (https://www.vaultproject.io)
# * httpie (https://github.com/jkbrzt/httpie)
@jdeathe
jdeathe / make-local-cert.sh
Last active April 8, 2025 02:36
Generate a Root CA + Intermediate CA for local (internal) use on Mac OSX using cfssl and add the intermediate certificate to your keychain so it can be trusted by your local browser.
#!/usr/bin/env bash
# REF: https://github.com/cloudflare/cfssl
# Change working directory
cd -- "$(
dirname "${0}"
)" || exit 1
readonly CA_ROOT_CERT_KEY="ca-root"
@chrishoffman
chrishoffman / pki-setup.sh
Last active July 19, 2023 15:52
Vault Multi-Level CA Setup
vault mount pki
vault mount -path=pki1 pki
vault mount -path=pki2 pki
vault mount -path=pki3 pki
vault mount-tune -max-lease-ttl=87600h pki
vault mount-tune -max-lease-ttl=87600h pki1
vault mount-tune -max-lease-ttl=87600h pki2
vault mount-tune -max-lease-ttl=87600h pki3
vault write pki/root/generate/internal common_name="Vault Testing Root Authority" ttl=87600h

Tools in play

  • Vanagon - Combine all your software into a package with this one weird trick
  • VMPooler - Warm cache for VMs of all flavors
  • EZbake - Packaging tool for clojure projects
  • Beaker - Testing Harness
  • Puppet Agent - The AIO package of Puppet and friends
  • Packaging Repo - packaging and shipping workflows
  • PL Build Tools - GCC and friends for building our stack
@aallan
aallan / mac-vendor.txt
Last active May 11, 2025 20:59
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@etspaceman
etspaceman / create_kinesis_stream.sh
Last active February 16, 2023 14:58
Local Kinesis Setup w/ LocalStack
#!/usr/bin/env bash
export $(cat .env | xargs)
KINESIS_STREAM_SHARDS=${KINESIS_STREAM_SHARDS:-1}
export USE_SSL=true
awslocal kinesis create-stream --shard-count ${KINESIS_STREAM_SHARDS} \
--stream-name ${KINESIS_STREAM_NAME}
Description: Create a variable number of EC2 instance resources.
Parameters:
InstanceCount:
Description: Number of EC2 instances (must be between 1 and 10).
Type: Number
Default: 1
MinValue: 1
MaxValue: 10
ConstraintDescription: Must be a number between 1 and 10.
ImageId: