# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button
# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 1T 0 part
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#### borrowed heavily from https://stackoverflow.com/questions/53519058/how-to-delete-vpc-with-all-its-dependencies-using-boto3 | |
#### also found this online: https://github.com/jeffbrl/aws-vpc-destroy/blob/master/vpc_destroy.py | |
import boto3 | |
import json | |
import re | |
import sys | |
from pprint import pprint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# curl -s https://gist.githubusercontent.com/ilude/457f2ef2e59d2bff8bb88b976464bb91/raw/cluster_create_setup.sh?$(date +%s) > ~/bin/setup_cluster.sh; chmod +x ~/bin/setup_cluster.sh; setup_cluster.sh | |
echo "begin cluster_create_setup.sh" | |
export CREATE_TEMPLATE=1 #false | |
while test $# -gt 0; do | |
case "$1" in | |
--template) | |
export CREATE_TEMPLATE=0 #true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
#This is a perl script intended to be used with a JSON file generated by https://github.com/hartator/wayback-machine-downloader and aims to convert an entire website archived with the wayback machine into a git repository with commits that correspond to a modification in a snapshot file. | |
#Some limitations of wayback-machine-downloader are dealt with, making this script quite slow: | |
# - wget is used so files are downloaded with proper modification timestamp | |
# - HTML files are scraped from their embeded Internet Archive code and links | |
# - duplications are found and discarded using MD5 comparison | |
#This is just a proof of concept that only works in Linux and it uses quite a few hacks to get it done | |
#If you want to convert or port this concept into a project, please follow GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ./convert -a asdfghjk | |
# Obtain an activation_bytes string and plug it into this script with -a. | |
FILES=aax/* | |
OUTPUT=mp3 | |
while getopts a: option | |
do | |
case "${option}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Brad Wilson | |
email = [email protected] | |
signingkey = 0B7BD15AD1EC5FDE | |
[alias] | |
a = add -A | |
abort = rebase --abort | |
amend = commit --amend -C HEAD | |
bclean = "!f() { git switch ${1-main} && git branch --merged ${1-main} | grep -v ${1-main}$ | xargs git branch -d; }; f" | |
bdone = "!f() { git switch ${1-main} && git up && git bclean ${1-main}; }; f" |
in case of processing a very large array e.g. Promise.all(A_VERY_LARGE_ARRAY_OF_XHR_PROMISE)
which would probably blow you browser memory by trying to send all requests at the same time
solution is limit the concurrent of requests, and wrap promise in thunk
Promise.allConcurrent(2)([()=>fetch('BLAH1'), ()=>fetch('BLAH2'),...()=>fetch('BLAHN')])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as mongoose from 'mongoose'; | |
export let Schema = mongoose.Schema; | |
export let ObjectId = mongoose.Schema.Types.ObjectId; | |
export let Mixed = mongoose.Schema.Types.Mixed; | |
export interface IHeroModel extends mongoose.Document { | |
name: string; | |
power: string; |
NewerOlder