Skip to content

Instantly share code, notes, and snippets.

@dansimau
dansimau / ping-csv.sh
Created December 23, 2011 11:01
Ping a host and output each reply in CSV format
#!/bin/bash
#
# Do a ping and output results as CSV.
#
# dsimmons@squiz.co.uk
# 2011-12-23
#
if [ $# -lt 1 ]; then
echo "Usage: $0 [--add-timestamp] <ping host>"
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@digitaljhelms
digitaljhelms / gist:4287848
Last active May 25, 2024 22:25
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@phette23
phette23 / current-dir-in-iterm-tab-title.sh
Last active January 4, 2024 10:20
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html
@nilya
nilya / detect_unsafe_aws_sg.sh
Created September 13, 2013 12:32
Script finds AWS Security Groups (SG) with potentially unsafe rules and lists instances that use such security groups.
#!/bin/sh
# Script finds AWS Security Groups with potentially unsafe rules and lists instances that use such security groups.
#
# Unsafe security group rules are:
# 1. open to the world (0.0.0.0/0),
# 2. not restricted to another security group,
# 3. not use safe ports (22,80,443; you can set SAFE_PORTS environment variable to override).
#
# To run this script:
@yuryu
yuryu / pre-warm-elb.pl
Last active June 2, 2021 21:52
ELB Warm-up tool
#!perl
use strict;
use warnings;
use Parallel::ForkManager;
use POSIX;
use String::Random;
my $c_start = 1;
my $c_end = 64;
@niksumeiko
niksumeiko / git.migrate
Last active May 13, 2024 15:34
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@eerien
eerien / aws_rss_feeds.xml
Last active March 6, 2020 06:57
AWS RSS Feeds OPML includes AWS Status, AWS Forum Announcements, AWS Blogs, AWS Partners, AWS News, AWS Release Notes and AWS Security Bulletins
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>AWS RSS Feeds</title>
</head>
<body>
<outline title="AWS Status" text="AWS Status">
<outline text="Amazon Mobile Analytics (N. Virginia) Service Status" title="Amazon Mobile Analytics (N. Virginia) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/analytics-us-east-1.rss" htmlUrl="http://status.aws.amazon.com/" rssfr-favicon="http://status.aws.amazon.com/favicon.ico"/>
<outline text="Amazon AppStream (N. Virginia) Service Status" title="Amazon AppStream (N. Virginia) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/appstream-us-east-1.rss" htmlUrl="http://status.aws.amazon.com/" rssfr-favicon="http://status.aws.amazon.com/favicon.ico"/>
<outline text="Auto Scaling (Tokyo) Service Status" title="Auto Scaling (Tokyo) Service Status" type="rss" xmlUrl="http://status.aws.amazon.com/rss/autoscaling-ap-northeast-1.rss" htmlUrl="http://status.a
@soarez
soarez / ca.md
Last active May 28, 2024 02:57
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@phybros
phybros / update-route53.sh
Last active February 12, 2024 00:07
BASH Script to keep Route53 updated with your current external IP address
#!/bin/bash
# (optional) You might need to set your PATH variable at the top here
# depending on how you run this script
#PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Hosted Zone ID e.g. BJBK35SKMM9OE
ZONEID="enter zone id here"
# The CNAME you want to update e.g. hello.example.com