Skip to content

Instantly share code, notes, and snippets.

View dgitman's full-sized avatar

David Gitman dgitman

View GitHub Profile
@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 
@dgitman
dgitman / twitterUnmuteAll.js
Last active February 25, 2024 09:43
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 / ssh-set-perms.sh
Created October 4, 2020 23:43
Local SSH permissions
chmod 700 .ssh
chmod 600 .ssh/*
chmod 644 .ssh/*.pub
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 / 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
@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 / local.xml
Last active February 20, 2018 16:00 — forked from jasontipton/local.xml
Magento Local.xml NOINDEX/NOFOLLOW Catalog Search
<?xml version="1.0"?>
<layout version="0.1.0">
<!-- Search Results page -->
<catalogsearch_result_index>
<reference name="head">
<action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action>
</reference>
</catalogsearch_result_index>
<!-- Questions
1- Format/Structuer the Html code above
2- Make the "Hello Cue" title Blue and bold, with text size = 20px
3- Make span lined up with the Hello Cue title
4- Use JQuery to Change the Title to "Hello Dolly" and to Add a new class named "cue-link"
5- Add this HTML tag "<cue id='cue-stream'>My List</cue>" next to the <span> and make the span and the cue tag shows in a separate new line
6- Use Css to style the <cue> and make it with a pointer on hover-over
-->
@dgitman
dgitman / osx-for-hackers.sh
Created July 5, 2016 13:14 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@dgitman
dgitman / System Design.md
Created April 26, 2016 16:54 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?