Skip to content

Instantly share code, notes, and snippets.

View flozz's full-sized avatar

Fabien LOISON flozz

View GitHub Profile
@flozz
flozz / desable_touchpad.py
Last active August 24, 2017 12:18
Disables the touchpad of the Thinkpad X1 Carbon under X11. It probably wroks with other PC too.
#!/usr/bin/env python
## DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
## Version 2, December 2004
##
## Copyright (C) 2004 Sam Hocevar <[email protected]>
##
## Everyone is permitted to copy and distribute verbatim or modified
## copies of this license document, and changing it is allowed as long
## as the name is changed.
@flozz
flozz / font-convertor.py
Created May 12, 2017 07:28
Converts fonts using FontForge
#!/usr/bin/env python
## To allow this script to work, you must install FontForge with its Python
## extention. On Debian / Ubuntu, this can be done with the following command:
##
## apt install fontforge python-fontforge
## usage: font-convertor.py [-h] input_file output_file
##
## Converts fonts using FontForge
@flozz
flozz / obsidian-file-checker-php.php
Created January 20, 2017 09:59
Checks that an Obsidian File is coherent (based on header and file size)
<?php
function check_obsidian_project($bytes) {
$HEADERS_LENGTH = 51;
$MIN_SECTION_SIZE = 2;
if (strlen($bytes) <= $HEADERS_LENGTH) {
return false;
}