Skip to content

Instantly share code, notes, and snippets.

View fernandoacorreia's full-sized avatar

Fernando Correia fernandoacorreia

View GitHub Profile
FROM busybox
ENV TEST_VAR 1
@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 ""
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 / 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.
@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 / 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 / WorkerRole.cs
Created December 8, 2012 14:02
Asynchronous insert in Azure Tables (complete example)
using System;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
namespace WorkerRole1
{
public class WorkerRole : RoleEntryPoint
@fernandoacorreia
fernandoacorreia / gist:4240367
Created December 8, 2012 14:02
Asynchronous insert in Azure Tables (fragment)
public void Write(TableServiceEntity entity)
{
TableServiceContext context = _tableClient.GetDataServiceContext();
context.AddObject(_tableName, entity);
context.BeginSaveChangesWithRetries((asyncResult => context.EndSaveChangesWithRetries(asyncResult)), null);
}
@fernandoacorreia
fernandoacorreia / WorkerRole.cs
Created December 7, 2012 21:52
Asynchronous insert in Azure Tables
using System;
using System.Data.Services.Client;
using System.Diagnostics;
using System.Net;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.ServiceRuntime;
using Microsoft.WindowsAzure.StorageClient;
namespace WorkerRole1