Skip to content

Instantly share code, notes, and snippets.

View pgpbpadilla's full-sized avatar
🏠
Working from home

Pablo Padilla pgpbpadilla

🏠
Working from home
  • Kuehne + Nagel (AG & Co.) KG
  • Hamburg, Deutschland
View GitHub Profile
@pgpbpadilla
pgpbpadilla / renew-gpgkey.md
Created August 30, 2023 18:25 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@pgpbpadilla
pgpbpadilla / cf_list_matching
Created July 7, 2017 21:45
Get only CloudFormation stack names that contain a pattern.
aws cloudformation --profile <profile> --region us-east-1 list-stacks | jq .StackSummaries | jq 'map(.StackName)' | grep "AT-" | sed 's/[ ",]//g'cat stacks | jq .StackSummaries | jq 'map(.StackName)' | grep "<pattern>" | sed 's/[ ",]//g'
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@pgpbpadilla
pgpbpadilla / sizeof.js
Last active May 1, 2020 14:01
Javascript `sizeof`: Calculates the memory used by an object.
/*jslint indent:2, browser: true, node: true*/
/** Taken from: http://stackoverflow.com/a/11900218/400544 */
'use strict';
(function () {
var typeOfWindow = typeof window;
function sizeof(object) {
@pgpbpadilla
pgpbpadilla / pre-commit-jslint
Created April 6, 2014 00:47
Git pre-commit hook: Run JSLint for NodeJS projects
#!/bin/sh
# find node
NODE=$(which node)
# if it cannot find a node installation
if [[ -z $NODE ]]; then
#NodeJS is not installed
echo "Please install NodeJS first."
exit 1