Skip to content

Instantly share code, notes, and snippets.

View 0xjac's full-sized avatar
🛰️
loading...

Jacques Dafflon 0xjac

🛰️
loading...
View GitHub Profile
@0xjac
0xjac / private_fork.md
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 git@github.com:usi-systems/easytrace.git

Keybase proof

I hereby claim:

  • I am 0xjac on github.
  • I am 0xjac (https://keybase.io/0xjac) on keybase.
  • I have a public key ASA-NPIxmyFQ1ismXY0MvmW8bisZKMokD0XOFXQdGhZgHAo

To claim this, I am signing this object:

@0xjac
0xjac / Bool.java
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
0xjac / flask-multipass_instructions.md
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.

Prerequisites

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

python --version
@0xjac
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 https://gist.github.com/jacquesd/
// @version 0.4
// @description Shows the course names instead of ides on the side menu.
// @author Jacques Dafflon
// @match https://www2.icorsi.ch/*
// @website https://gist.github.com/jacquesd/a322655dd93b30f0bba8
// @source https://gist.githubusercontent.com/jacquesd/a322655dd93b30f0bba8/raw/fix_icorsi.user.js
// @updateURL https://gist.githubusercontent.com/jacquesd/a322655dd93b30f0bba8/raw/fix_icorsi.user.js
@0xjac
0xjac / client_server.py
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):
PROTOCOL = 0xFD
PORT = 0x6901
@0xjac
0xjac / Adv-Ntw_A2_help.md
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.

Disclaimer

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
0xjac / flops.sh
Created September 23, 2016 14:27
FLOPS
#!/usr/bin/env bash
FLOP=4000000;
gcc -o main main.c;
TIMEFORMAT=%R
ELAPSED=`( time ./main ) 2>&1 > /dev/null`
FLOPS=$(echo "$FLOP/$ELAPSED" | bc)
@0xjac
0xjac / acalab
Last active April 19, 2016 09:29
acalab
#!/usr/bin/env bash
HOSTNAME="aca-lab"
VMNAME="aca-lab"
HOST_PORT=3022
SSH_PORT=22
function cleanup {
# Poweroff the machine on exit or failure
VBoxManage controlvm "$VMNAME" poweroff
@0xjac
0xjac / BluetoothCursors.pde
Created April 7, 2016 11:50
Arduino Android Bluetooth communication example
/**
* <p>Ketai Library for Android: http://KetaiProject.org</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>