Skip to content

Instantly share code, notes, and snippets.

View ap1kenobi's full-sized avatar

Alexander Popov ap1kenobi

  • Philadelphia, PA
View GitHub Profile
@ap1kenobi
ap1kenobi / aws-backup-vault-purge.sh
Last active November 5, 2020 23:51
Removes all backups (aka recovery points) inside a AWS Backup vault
#!/bin/bash
set -e
echo "Enter the region of the vault where all backups should be deleted"
read REGION
echo "Enter the name of the vault where all backups should be deleted"
read VAULT_NAME

Keybase proof

I hereby claim:

  • I am ap1kenobi on github.
  • I am ap1kenobi (https://keybase.io/ap1kenobi) on keybase.
  • I have a public key ASC3LfQ3s6XrZZvgvLT6kdJt1ehkjPPrt13xrjQ3RDSo4Qo

To claim this, I am signing this object:

@ap1kenobi
ap1kenobi / s3copy-across-aws-accounts.js
Last active August 29, 2015 14:26 — forked from raffi-minassian/s3copy-across-aws-accounts.js
Quick and dirty script to copy files in AWS S3 to an S3 bucket in another AWS account with Node.js.
/*
* This is a quick and dirty script for copying files in AWS S3 to other buckets.
* This is written so it can work across AWS accounts.
* You can hack in code to apply work or logic to each file.
*
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible
* and deletes the file immediately when the upload is done.
*
* Best way to use: Spin up a micro in EC2, install node.js,
* create a directory and install the dependencies with
@ap1kenobi
ap1kenobi / s3-upload-aws4.sh
Last active August 29, 2015 14:26 — forked from vszakats/s3-upload-aws4.sh
AWS S3 Upload using signature v4
#!/bin/sh
# To the extent possible under law, Viktor Szakats (vszakats.net)
# has waived all copyright and related or neighboring rights to this
# script.
# CC0 - https://creativecommons.org/publicdomain/zero/1.0/
# Upload a file to Amazon AWS S3 using Signature Version 4
#
# docs:
~/c/b/osx ❯❯❯ make ⏎
mkdir -p dmg
sudo prepare_iso/prepare_iso.sh iso/OS\ X\ Yosemite/Install\ OS\ X\ Yosemite.app dmg
Password:
-- Attaching input OS X installer image with shadow file..
expected CRC32 $F5B3F033
/dev/disk2 Apple_partition_scheme
/dev/disk2s1 Apple_partition_map
/dev/disk2s2 Apple_HFS /private/tmp/veewee-osx-esd.VLmU
-- Mounting BaseSystem..
# This script is mostly based on jcpowermac's https://gist.github.com/e8e72c1b6a551f75c5cf.git
#
#!/usr/bin/env bash
set -e
sudo apt-get update
sudo apt-get install -y git
sudo apt-get install -y make
sudo apt-get install -y mongodb
# Knife Configuration File.
#
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
#
# ~/Development/chef-repo/.chef/knife.rb
<powershell>
#####
#DON'T FORGET TO SET/CHANGE THE USERNAME/PASSWORD BELOW!!!!!!!!!!
#####
$user="opscode"
$password="opscode"