Skip to content

Instantly share code, notes, and snippets.

View dgitman's full-sized avatar

David Gitman dgitman

View GitHub Profile
@dgitman
dgitman / Dockerfile
Created March 22, 2019 12:36 — forked from georanma/Dockerfile
Docker Magento 1 w/ Xdebug
FROM php:7.2-fpm
RUN apt-get -qq update && apt-get -qq install libxml++2.6-dev > /dev/null
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
zlib1g-dev \
libicu-dev \
g++ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
@dgitman
dgitman / generate-ssh-key.sh
Last active April 12, 2019 12:30 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "david@gitman.net" -f ~/.ssh/id_rsa
files:
/opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn.sh:
content: |-
#!/usr/bin/env bash
set -xe
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir)
EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir)
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user)
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)
@dgitman
dgitman / ssh-set-perms.sh
Created October 4, 2020 23:43
Local SSH permissions
chmod 700 .ssh
chmod 600 .ssh/*
chmod 644 .ssh/*.pub
@dgitman
dgitman / twitterUnmuteAll.js
Last active April 18, 2024 20:09
Twitter Unmute All Muted Accounts
# Go To https://twitter.com/settings/muted/not_following
# Open the browser developer tools
# Paste into browser console
let autoUnblock = setInterval(function() {
window.scrollBy(0, window.innerHeight);
document.querySelectorAll('[aria-label^="Unmute"]').forEach(function(account) {
account.click()
});
}, 1000);
@dgitman
dgitman / aws_glacier_delete_vault.md
Created January 7, 2022 19:14 — forked from veuncent/aws_glacier_delete_vault.md
Delete all archives in an AWS Vault

AWS Glacier: Delete vault

Follow these steps to remove all archives from an AWS vault. After this is finished, you will be able to delete the vault itself through the browser console.

Step 1 / Retrieve inventory

This will create a job that collects required information about the vault.

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --account-id YOUR_ACCOUNT_ID --region YOUR_REGION --vault-name YOUR_VAULT_NAME