Skip to content

Instantly share code, notes, and snippets.


momoterraw andrewvmail

  • Vancouver
View GitHub Profile
View samizdat-shell-help.bash
### my-script — does one thing well
### Usage:
### my-script <input> <output>
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
andrewvmail /
Last active Apr 5, 2020 — forked from Kutkovsky/
The steps allowing to create macOS 10.15 Catalina VM on vSphere or ESXi
# Added after beta and doing it at a catalina machine.
# App Store > macOS Catalina > GET
# Steps to create the macOS Catalina (10.15) VM:
# login to or to download a tester's profile for your OS. Install it.
# Go to System Preferences > Software Update and start the update process
# When the Catalina Installer (few MBytes) is started, it downloads the remain part of installation.
andrewvmail / index.js
Created Mar 29, 2020 — forked from NoTimeForHero/index.js
NodeJS script to remove 1000 DNS records added by Cloudflare when used * (wildcard) A record
View index.js
// Now if you adding a domain with wildcard A record, Cloudflare uses strange scan, which added a 1000 trash domains (like 1-100, some english words like "ai", "air", "android").
// There's no way to bulk delete it, you can delete it only using their API.
// So I write a script that can help you with this problem.
// Discussions about same problem:
const settings = {
email: 'your@email',
andrewvmail /
Created Jan 2, 2020 — forked from foozmeat/
A shell script to build openssl for iOS and Mac. It currently builds: Mac -> i386 & x86_64 // iOS -> armv7, arm64 // iOS Simulator -> i386 & x86_64.
# This script builds the iOS and Mac openSSL libraries
# Download openssl and place the tarball next to this script
# Credits:
andrewvmail / build.gradle
Created Jul 3, 2019 — forked from tprochazka/build.gradle
Smart versionName and versionCode for android Gradle build evaluation
View build.gradle
* Will return version from properties file and replace -SNAPSHOT by GIT commit hash
* to recognize origin commit for the every build.
project.ext.evalVersionName = {
def ideBuild =['android.injected.invoked.from.ide']
if (ideBuild) {"IDE build");
return "dev"
} else if (project.VERSION.toUpperCase().contains("SNAPSHOT")) {
andrewvmail / interval.js
Created Jun 26, 2019 — forked from manast/interval.js
Accurate Javascript setInterval replacement
View interval.js
function interval(duration, fn){
this.baseline = undefined = function(){
if(this.baseline === undefined){
this.baseline = new Date().getTime()
var end = new Date().getTime()
this.baseline += duration
andrewvmail /
Created Jun 26, 2019 — forked from msrose/
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

andrewvmail /
Created Jun 13, 2019 — forked from jasonrudolph/
5 entertaining things you can find with the GitHub Search API
andrewvmail /
Last active May 21, 2019 — forked from Mins/
Automating mysql_secure_installation
set -x
SECURE_MYSQL=$(expect -c "
set timeout 10
spawn mysql_secure_installation
expect \"Would you like to setup VALIDATE PASSWORD plugin?\"
send \"n\r\"
expect \"New password:\"
andrewvmail / decimalize_git_hash.bash
Created Oct 15, 2018 — forked from hborders/decimalize_git_hash.bash
Print the given git hash + a prepended "1" in decimal form
View decimalize_git_hash.bash
#!/bin/bash -euo pipefail
if [ ${#} -eq 0 ]
# read from STDIN