Skip to content

Instantly share code, notes, and snippets.

@seano-vs
seano-vs / aws_RDS_wait.sh
Last active March 10, 2021 15:58 — forked from sgnn7/aws_ec2_wait.sh
Wait for AWS RDS snapshot or volume for longer than 20 mins
#!/bin/bash -e
RDS_REGION="us-east-1"
DEFAULT_PROGRESS_WAIT=30
# ========== SNAPSHOT WAIT ==============
snapshot_id=$1
while [ "$snapshot_progress" != "100" ]; do
sleep "$DEFAULT_PROGRESS_WAIT"
@DragonBe
DragonBe / FinalClass.php
Created July 20, 2017 15:05
Testing final classes is tricky, but possible even though you cannot directly mock a "final" class
<?php
namespace FinalClass;
require_once __DIR__ . '/vendor/autoload.php';
use PHPUnit\Framework\TestCase;
final class Foo
{
protected $bar;
@andkirby
andkirby / slack.sh
Last active September 18, 2025 15:26
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?