Skip to content

Instantly share code, notes, and snippets.

View hugoferreira's full-sized avatar

Hugo Sereno Ferreira hugoferreira

View GitHub Profile
@jehiah
jehiah / activity_snapshot.sh
Created January 7, 2013 18:43
A cron job script to capture computer activity every 30 seconds
#!/bin/sh
# computer activity data collection for http://jehiah.cz/one-two/
# by Jehiah Czebotar
FILE="activity_log/`date +%Y%m%d`.log"
function log_activity()
{
local UTC=`date "+%s,%Z"`
local IDLE=$((`/usr/sbin/ioreg -c IOHIDSystem | sed -e '/HIDIdleTime/!{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000 ))
@ruimaranhao
ruimaranhao / SoftEng.md
Last active March 27, 2022 19:50
Using Github to Teach Software Engineering: A Hands-on Approach

Teaching Software Engineering using GitHub

Rui Maranhão

Software engineering is the study and an application of engineering to the software development lifecycle, including requirements, design, architecture, development, testing, and maintenance. It is important that Universities teach students not only the theory underlying these phases, but also allow students to practice using real systems.

Quoting Arie van Deursen:

When teaching software engineering [architecture] it is hard to strike the right balance between practice (learning how to work with real systems and painful trade offs) and theory (general solutions that any architect needs to thoroughly understand).

To address this, inspired by TUDelft's Software Architecture course, we decided try something different in the Software Engineering course of the University of Porto's [Master in

/*
* 'Origami Programming' by Hugo Sereno Ferreira
*
* IEEE Talk @ FEUP (2018)
*
* Exercise sheet (http://goo.gl/Dd4p7b)
*
* Note: Make sure you have node.js, and then install the dependencies using:
*
* npm install -g lodash
@dcastro
dcastro / origami-solution.js
Last active April 30, 2018 12:58
Origami Programming Exercises
// Exercises: https://gist.github.com/hugoferreira/21f1f0ec23186adb5e6832e6aee618d6
const eq = require('lodash').isEqual
const fold = (as, base) => (f) => {
let result = base
for (let i = 0; i < as.length; i++)
result = f(result, as[i])
return result
}