Skip to content

Instantly share code, notes, and snippets.

View 0xjac's full-sized avatar

Jacques Dafflon 0xjac

View GitHub Profile
0xjac /
Last active July 13, 2024 17:44
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare

Keybase proof

I hereby claim:

  • I am 0xjac on github.
  • I am 0xjac ( on keybase.
  • I have a public key ASA-NPIxmyFQ1ismXY0MvmW8bisZKMokD0XOFXQdGhZgHAo

To claim this, I am signing this object:

0xjac /
Created December 4, 2017 10:13
SmallTalk ifTrue ifFalse implementation in Java for my Programming Styles class
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Supplier;
public abstract class Bool {
public static final Bool TRUE = new True();
public static final Bool FALSE = new False();
public abstract <T> T ifTrueIfFalse(Supplier<T> fTrue, Supplier<T> fFalse);
private static class True extends Bool {
public <T> T ifTrueIfFalse(Supplier<T> fTrue, Supplier<T> fFalse) {
0xjac /
Created April 22, 2015 14:06
Flask-Multipass Instructions

Thank you for helping us test the new LDAP provider for Indico.

Below you will find instructions on how to install and use the example application for testing. While this is a very simple application, it uses the same code as Indico 2.0 to perform LDAP operations.

Testing this application with the LDAP server you use for Indico will allow us to catch LDAP related bugs before we release Indico 2.0 or Flask-Multipass.


Flask-Multipass requires Python 2.7 or newer. You can test it using:

python --version
0xjac / fix_icorsi.user.js
Last active February 3, 2017 01:48
Shows course names instead of ids on icorsi.
// ==UserScript==
// @name fix_icorsi
// @namespace
// @version 0.4
// @description Shows the course names instead of ides on the side menu.
// @author Jacques Dafflon
// @match*
// @website
// @source
// @updateURL
0xjac /
Last active December 14, 2016 12:55
modified version showing the Easytrace, Credits to Giacomo
#!/usr/bin/env python
import argparse
import sys
from scapy.all import IP, UDP, Packet, XIntField, XByteField, bind_layers, Ether, sendp, sniff
class EasyTrace(Packet):
PORT = 0x6901
0xjac /
Last active December 7, 2016 14:33
Help for the Assignment 2 of Advance Networking.

Adv-Ntw: Assignment 2 Help

Hello, I found that this assignment had quite a bit of overhead to setup everything properly. The information below should facilitate your work with vagrant, Mininet and Ryu. I however will not provide any help on how to do the actual assignment.

If anything is unclear or if something does not work, don't hesitate to comment below.


If you find the information below helpful and use part or all of it for your assignment, I would appreciate if you could mention it in your submission. Either just by indicating my name or the link to this gist.

0xjac /
Created September 23, 2016 14:27
#!/usr/bin/env bash
gcc -o main main.c;
ELAPSED=`( time ./main ) 2>&1 > /dev/null`
FLOPS=$(echo "$FLOP/$ELAPSED" | bc)
0xjac / acalab
Last active April 19, 2016 09:29
#!/usr/bin/env bash
function cleanup {
# Poweroff the machine on exit or failure
VBoxManage controlvm "$VMNAME" poweroff
0xjac / BluetoothCursors.pde
Created April 7, 2016 11:50
Arduino Android Bluetooth communication example
* <p>Ketai Library for Android:</p>
* <p>KetaiBluetooth wraps the Android Bluetooth RFCOMM Features:
* <ul>
* <li>Enables Bluetooth for sketch through android</li>
* <li>Provides list of available Devices</li>
* <li>Enables Discovery</li>
* <li>Allows writing data to device</li>
* </ul>