Skip to content

Instantly share code, notes, and snippets.

View zwilias's full-sized avatar

Ilias Van Peer zwilias

View GitHub Profile
{
"testResult": {
"name": "My test",
"status": "PASSED",
"id": "e93e081a-7d77-4689-9728-9c2bc1b51983"
}
}
# Create the directory and make sure
mkdir -p ~/.git-template/hooks
# Create a post-commit file in that directory and feed it the commit-hook:
cat > ~/.git-template/hooks/post-commit << EOF
#!/usr/bin/env ruby
file="~/.gitshots/#{Time.now.to_i}.jpg"
unless File.directory?(File.expand_path("../../rebase-merge", __FILE__))
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file} &"
/* Initialise all rearrangement matrices */
lowerX = new RearrangeMatrix(data.getLowerX());
lowerY = new RearrangeMatrix(data.getLowerY());
upperX = new RearrangeMatrix(data.getUpperX());
upperY = new RearrangeMatrix(data.getUpperY());
ExecutorService executor = Executors.newFixedThreadPool(2);
for (final RearrangeMatrix matrix : new RearrangeMatrix[]{lowerX, lowerY, upperX, upperY}) {
executor.execute(new Runnable() {
@zwilias
zwilias / structure.js
Created May 30, 2013 12:45
Figure out the structure of an object to arbitrary depth in mongo (or anything else running V8)
function structure(anObject, maxDepth) {
if (maxDepth < 1) {
return Array.isArray(anObject)
? []
: typeof(anObject) === "object"
? {}
: typeof(anObject);
}
var clone;
function fbSave(result, collection) {
if (result.data) {
for (i in result.data) {
db[collection].save(result.data[i]);
}
return result.data.length;
} else {
db[collection].save(result);
return 1;
function fbGraph(user, item, params) {
item = item || "";
user = user || "me";
var url = "https://graph.facebook.com/" + user + "/" + item + "?access_token=" + token;
if (params) {
for (key in params) {
url += "&amp;" + encodeURIComponent(key) + "=" + encodeURIComponent(params[key]);
}
@zwilias
zwilias / wget.js
Created May 30, 2013 10:30
A wget wrapper for mongo-shell
function wget(url){
var tmp = "/tmp",
id = new ObjectId(),
outFile= tmp + "/wget" + id,
logFile= tmp + "/wgetLog",
p = run("wget", "--output-file=" + logFile, "--output-document=" + outFile, url),
result = "";
if (p==0){
result = cat(outFile);

Vergaderverslag dinsdag 21 mei 2013

Algemeen

Aanwezig:

  • Nancy Dierckx
  • Wouter Mouton
  • Jarrik Nys
  • Rens Oosterbos

De vergadering heeft om en bij de 60 minuten in beslag genomen van de geplande 30 à 60 minuten.

#Interview avec Xavier Ruiz#

Stijn Willems et Ilias Van Peer
3TX3/4
10/12/2012

Stijn Willems: Nous sommes des étudiants de KHLeuven, de la dernière année, et pour le cours de français on doit parler avec un informaticien, une demi-heure, qu'est-ce qu'il fait, qu'est-ce qu'il a étudié, qu'est-ce que vous faites ici, et avant que vous avez commencé à travailler ici, ou des autres choses.

Xavier Ruiz:

public class LinkedList
{
private class ListElement
{
private Object el1;
private ListElement el2;
public ListElement(Object el, ListElement nextElement)
{
el1 = el;