Skip to content

Instantly share code, notes, and snippets.

View fernandoacorreia's full-sized avatar

Fernando Correia fernandoacorreia

View GitHub Profile
@fernandoacorreia
fernandoacorreia / run-notebook.sh
Created February 20, 2020 19:32
Runs Jupyter scipy-notebook in a container
#!/bin/bash
docker run -p 8888:8888 -v $(pwd):/home/jovyan/host jupyter/scipy-notebook
@fernandoacorreia
fernandoacorreia / convert.py
Created February 20, 2020 19:31
Converts KeePass CSV file to 1Password format
#!/usr/bin/env python
# Converts KeePass CSV file to 1Password format
import pandas as pd
import numpy as np
source_file = 'keepass.csv'
target_file = 'converted.csv'
# Read source data
@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.
@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!")
}
}

Keybase proof

I hereby claim:

To claim this, I am signing this object: