Skip to content

Instantly share code, notes, and snippets.

View kamermans's full-sized avatar
😏

Steve Kamerman kamermans

😏
View GitHub Profile
@bubba-h57
bubba-h57 / ELBAccessToSplunk.php
Last active August 29, 2015 14:00
Script to get AWS Elastic Load Balancer (ELB) Access Logs into Splunk Storm. Keep in mind that ELB ships logs to S3 every five minutes, so if you schedule this to run every five minutes, and it runs as fast as possible, your Splunk will still lag real time by at least five minutes.
#!/usr/bin/php
<?php
/**
* ELBAccessToSplunk.php
*
* Take ELB Access logs that have been shipped to AWS S3
* and transforms them into Splunks generic_single_line
* in a new composite logfile on the system, monitored
* by Splunk Storm.
*
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@kamermans
kamermans / configure_docker0.sh
Last active December 29, 2024 12:44
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }
@ralph-tice
ralph-tice / gist:bc8f66c4fe1d4238ce54c54272fc4ba2
Last active November 17, 2024 13:55
Resizing a Kafka cluster via bash
#!/bin/bash -xe
# requires jq and 3 brokers to start
which jq || echo 'no jq found, bye!' && exit 1
ZK_HOST=zkhost1:2181/kafka
# record all topics
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics
# generate json for listing which topics to reassign
@kamermans
kamermans / README.md
Created September 29, 2024 03:07
PuTTY settings and sessions backup and restore for Windows

This set of scripts backs up and restores your PuTTY settings from the Windows registry

Run PuTTY backup

First, open powershell as an administrator

# Adjust the execution policy to run the script
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process

# Backup PuTTY data