Skip to content

Instantly share code, notes, and snippets.

View fernandoacorreia's full-sized avatar

Fernando Correia fernandoacorreia

View GitHub Profile
@fernandoacorreia
fernandoacorreia / gist:6298651
Last active December 21, 2015 11:28
Sample output from installer.py using grep '^INSTALL' on the log file.
INSTALL: Installing server software
INSTALL: sudo apt-get update
INSTALL: sudo apt-get upgrade -qq
INSTALL: sudo apt-get install build-essential libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev python-software-properties unzip git-core libcurl4-openssl-dev libbz2-dev libmysqlclient-dev mongodb-clients libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev libgdbm-dev ncurses-dev automake libffi-dev htop libtool bison libevent-dev libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev libjson0-dev libmcrypt-dev libicu-dev cmake gettext curl libpq-dev mercurial -qq
INSTALL: sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ubuntu-toolchain-r/test
INSTALL: sudo apt-get update
INSTALL: sudo apt-get install gcc-4.8 g++-4.8 -qq
INSTALL: cp ../config/benchmark_profile ../../.bash_profile
INSTALL: sudo sh -c "echo '* - nofile 16384' >> /etc/security/limits.conf"
INSTALL: sudo apt-get install maven -qq
@fernandoacorreia
fernandoacorreia / Gruntfile.js
Created April 18, 2014 20:05
Gruntfile configuration to copy images from bower_components into dist/styles/images (see http://stackoverflow.com/a/16973048/376366)
imagemin: {
dist: {
files: [{
expand: true,
cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.{gif,jpeg,jpg,png}',
dest: '<%= yeoman.dist %>/images'
}, {
expand : true,
flatten : true,
@fernandoacorreia
fernandoacorreia / test3.ipynb
Created October 8, 2014 16:20
sample IPython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BeautifulSoup==3.2.1
Jinja2==2.7.3
Mako==0.9.1
MarkupSafe==0.18
PAM==0.4.2
Pillow==2.3.0
Pygments==1.6
Twisted-Core==13.2.0
Twisted-Names==13.2.0
Twisted-Web==13.2.0
@fernandoacorreia
fernandoacorreia / gist:aaa45d00b74baa4c4e85
Last active August 29, 2015 14:14
Launch a Scala Notebook in Domino
#!/bin/bash
set -o nounset -o errexit
echo ""
echo "Downloading scala-notebook"
echo "--------------------------"
cd /tmp
wget -q https://github.com/chrismyang/scala-notebook/releases/download/0.1-SNAPSHOT/notebook-server-assembly-0.1-SNAPSHOT.jar
echo ""
FROM busybox
ENV TEST_VAR 1
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`.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@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.