Skip to content

Instantly share code, notes, and snippets.

View fernandoacorreia's full-sized avatar

Fernando Correia fernandoacorreia

View GitHub Profile
#!/bin/bash
#
# Outputs JSON paths.
#
# Based on https://news.ycombinator.com/item?id=20264654
#
# Usage:
# curl -s https://raw.githubusercontent.com/sitepoint-editors/json-examples/master/src/db.json | ./jsonpaths
jq -r --stream '
@fernandoacorreia
fernandoacorreia / results.md
Last active January 18, 2019 23:18
Domino build times

Results for:

git checkout 6197997b49074164bf2c6d646db1db10d466d43b; dev/deep-clean.sh; export SBT_OPTS="-Xmx4g"; time sbt domino/test:compile domino/it:compile

Dell Precision 5520

(4-core Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz; 32 GB RAM)

1291.53s user 42.03s system 307% cpu 7:14.27 total

@fernandoacorreia
fernandoacorreia / index.html
Created November 18, 2018 18:49
Escape the Room Escape the room // source https://jsbin.com/lomaquh
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Escape the room">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Escape the Room</title>
</head>
<body>
<pre id="view"></pre>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<pre id="view"></pre>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<pre id="view"></pre>
<script id="jsbin-javascript">
@fernandoacorreia
fernandoacorreia / index.html
Last active November 17, 2018 19:45
JavaScript move around -- source https://jsbin.com/lomaquh
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<pre id="view"></pre>
<script id="jsbin-javascript">
object App {
def main(args: Array[String]) {
println("Hello, world!")
}
}
@fernandoacorreia
fernandoacorreia / with_backoff.sh
Last active November 26, 2019 13:27
Retries a command a with backoff
#!/bin/bash
set -o nounset -o errexit -o pipefail
# Retries a command a with backoff.
# Based on https://stackoverflow.com/a/8351489/376366
# and https://gist.github.com/fernandoacorreia/b4fa9ae88c67fa6759d271b743e96063
#
# The retry count is given by ATTEMPTS (default 7), the
# initial backoff timeout is given by TIMEOUT in seconds
# (default 1). With default settings, it will try for about 1 minute.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

Run `start-kubernetes` to create the Kubernetes docker container.
Install kubectl and run `kubectl --server=http://localhost:8080 cluster-info` to see useful URLs.
Delete everything by running `remove-kubernetes`.