Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
#!/bin/bash | |
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:\" |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
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:
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.
function interval(duration, fn){ | |
this.baseline = undefined | |
this.run = function(){ | |
if(this.baseline === undefined){ | |
this.baseline = new Date().getTime() | |
} | |
fn() | |
var end = new Date().getTime() | |
this.baseline += duration |
/** | |
* 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 = project.properties['android.injected.invoked.from.ide'] | |
if (ideBuild) { | |
logger.info("IDE build"); | |
return "dev" | |
} else if (project.VERSION.toUpperCase().contains("SNAPSHOT")) { |
#!/bin/bash | |
# This script builds the iOS and Mac openSSL libraries | |
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
// 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: | |
// https://community.cloudflare.com/t/delete-all-records-using-api/13410/2 | |
// https://community.cloudflare.com/t/bulk-delete-dns-record/89540 | |
const settings = { | |
email: 'your@email', |
#!/bin/bash | |
# 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 developer.apple.com or beta.apple.com 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. |
#!/bin/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. |
Download emacs-w64 and extract somewhere, e.g. a tools
or apps
folder like C:\Users\<user>\tools\emacs
.
Emacs and many other applications store its configuration in the user's "home" folder. Translated directly from the Unix world, that is %UserProfile%
(C:\Users\<user>
), but Windows prefers %AppData%
instead (C:\Users\<user>\AppData\Roaming
).
For simplicity's sake, override this by specifying the HOME
environment variable explicitly. Emacs and some other applications (e.g. MinGW) lets this override the default.