Skip to content

Instantly share code, notes, and snippets.

View superboum's full-sized avatar
💮
Working for Deuxfleurs

Quentin Dufour superboum

💮
Working for Deuxfleurs
View GitHub Profile
@superboum
superboum / ascii.csv
Created October 17, 2016 19:56
ASCII Code Table (decimal,hexadecimal,char)
001 00 NUL
002 01 SOH
002 02 STX
003 03 ETX
004 04 EOT
005 05 ENQ
006 06 ACK
007 07 BEL
008 08 BS
009 09 HT
@superboum
superboum / keybase.md
Created January 7, 2017 11:16
keybase.md

Keybase proof

I hereby claim:

  • I am superboum on github.
  • I am superboum (https://keybase.io/superboum) on keybase.
  • I have a public key whose fingerprint is 645F 540A AABE 1452 B294 C970 917F E482 0B73 9EB3

To claim this, I am signing this object:

@superboum
superboum / reader.pde
Created October 8, 2017 14:26
Some processing snippets
void setup() {
BufferedReader reader;
reader = createReader("euler.txt");
ArrayList<Integer> nombres = new ArrayList<Integer>();
while (true) {
try {
int lu = reader.read();
if (lu == -1) {
break;
} else {
float vit=1;
int taille =50;
PVector[] squares;
void setup() {
size(600, 600);
squares = new PVector[] {
new PVector(0,0),
new PVector(taille,taille),
@superboum
superboum / weather.pde
Last active November 5, 2017 15:54
Yahoo Weather API with YQL + Processing + Unirest
import com.mashape.unirest.http.*;
/* API Documentation :
* https://developer.yahoo.com/weather/#curl
* Click on "Current conditions for San Diego, CA" to have a similar requests.
* Conditions code can be found here: https://developer.yahoo.com/weather/documentation.html#codes (eg: 0 = tornado)
* You must create a folder named "code" in your sketch directory and put unirest.jar inside
*/
void setup() {
try {
@superboum
superboum / sms.py
Created November 6, 2017 19:07
Python script to easily send messages to your phone via the Free Mobile API
#!/usr/bin/python3
import requests, sys
payload = {
'user': sys.argv[1],
'pass': sys.argv[2],
'msg': sys.stdin.read()
}
r = requests.get("https://smsapi.free-mobile.fr/sendmsg", params=payload)
@superboum
superboum / server.py
Created November 7, 2017 21:06
Webserver that generates files of 100MB on the fly
# run with FLASK_APP=server.py flask run
# download your file on http://127.0.0.1:5000/random
from flask import Flask
from flask import Response
import os
app = Flask(__name__)
@app.route('/random')
def gen_random():
@superboum
superboum / camdelay.pde
Created April 2, 2018 11:36
Camera Delay Processing
import processing.video.*;
int delay = 3;
int square_size = 5;
Capture cam;
ArrayList<PImage> frames = new ArrayList();
void setup() {
size(640, 480);
@superboum
superboum / update-kernel
Last active May 15, 2018 19:51
Boot Linux EFI without intermediate bootloader
#!/usr/bin/bash
# How to add a UEFI entry
# efibootmgr \
# --disk /dev/sda \
# --create \
# --label 'Choisis moi' \
# --loader '\EFI\efistub\vmlinuz' \
# --unicode 'root=UUID=50200856-c21a-4bea-9412-bd2f7b27b8b5 ro rootflags=subvol=root rhgb quiet initrd=\EFI\efistub\initramfs' \
# --verbose
@superboum
superboum / ddclient.conf
Last active September 10, 2018 20:46
DDCLIENT
###
# DDCLIENT : https://www.cloudflare.com/technical-resources/#ddclient
###
# /etc/ddclient/ddclient.conf
daemon=600 # check every 600 seconds
syslog=yes # log update msgs to syslog
mail=root # mail all msgs to root
mail-failure=root # mail failed update msgs to root
pid=/var/run/ddclient.pid # record PID in file.