Skip to content

Instantly share code, notes, and snippets.

View andrefreitas's full-sized avatar

André Freitas andrefreitas

View GitHub Profile
/**
* Example of a strategy pattern
* We implement different behaviours for a robot
*/
class Robot {
Behaviour behaviour;
Robot(this.behaviour);
move() => print(behaviour.move());
}
hercules:~ andre$ rails new app
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:note="http://fe.up.pt/technical-note">
<rdf:Description rdf:about="http://goo.gl/0iY8qx">
<note:title>Linked Data com JSON</note:title>
<note:author>André Freitas</note:author>
<note:theme>21</note:theme>
<note:link>http://json-ld.org/</note:link>
<note:email>freitas.andre@fe.up.pt</note:email>
</rdf:Description>
</rdf:RDF>
FROM ubuntu:14.04
# Install Java
RUN apt-get install software-properties-common -y
RUN \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java7-installer && \
rm -rf /var/lib/apt/lists/* && \
if [ -z "$1" ]
then
echo "usage: $0 <git repository path>"
else
touch report_$USER.txt
echo "This will take a while..."
echo "Learning with 5 commits"
schwa $1 --commits 5 -l >> report_$USER.txt
echo "Learning with 50 commits"
schwa $1 --commits 50 -l >> report_$USER.txt
@andrefreitas
andrefreitas / Dockerfile
Created June 30, 2015 10:48
problem description
FROM ubuntu:14.04
RUN echo "Hello from docker" > index.html
RUN sudo apt-get install python3
RUN python3 -m http.server 80
EXPOSE 80
import pdb; pdb.set_trace()
cmake_minimum_required(VERSION 3.1)
project(hello)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
set(SOURCE_FILES
hello.h
hello.cpp
main.cpp
)
@andrefreitas
andrefreitas / docker-compose.yml
Last active October 8, 2016 02:41
sentry docker-compose
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
py.test
======================================================================= test session starts =======================================================================
platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /code, inifile: setup.cfg
plugins: cov-2.2.0
collected 76 items
bugimporters/tests/test_bugzilla.py .............
bugimporters/tests/test_github.py ....
bugimporters/tests/test_google.py ..F.F.F.F..........