Skip to content

Instantly share code, notes, and snippets.

View bagage's full-sized avatar

Gautier P bagage

  • France
View GitHub Profile
@bagage
bagage / pre-receive
Last active January 23, 2024 07:04
Submodule commit checker pre-receive server-side git hook
#!/bin/bash
# Service side git pre-receive hook
# Written by Gautier Pelloux-Prayer <gautier+git@damsy.net>, 2014
#
# Public domain
#
# Simply put this script in server git bare repository <your-git-folder>/hooks and
# apply 'chmod +x pre-receive'.
#
@bagage
bagage / No_Ride_Zone.geojson
Created May 8, 2021 17:51
Long Term Rental - ride zone
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bagage
bagage / _2021-01-22_19-35-25.csv
Created January 23, 2021 14:33
_2021-01-22_19-35-25.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 6 columns, instead of 11. in line 2.
os,cpu,gpu,ram,kernel,driver
Fedora 33 (Workstation Edition),Intel Core i7-5600U CPU @ 2.60GHz,,20366352,5.10.6-200.fc33.x86_64,4.6 Mesa 20.3.3
fps,frametime,cpu_load,gpu_load,cpu_temp,gpu_temp,gpu_core_clock,gpu_mem_clock,gpu_vram_used,ram_used,elapsed
60.0907,16941,18.4211,0,46,0,0,0,0,10.1184,608225
60.0907,16941,18.4211,0,46,0,0,0,0,10.1184,3758053
60.0907,16941,18.4211,0,46,0,0,0,0,10.1184,6852999
60.0907,16941,18.4211,0,46,0,0,0,0,10.1184,9941105
60.0907,16941,18.4211,0,46,0,0,0,0,10.1184,13212133
60.7818,15317,18.4211,0,46,0,0,0,0,10.1184,16312006
60.7818,15317,18.4211,0,46,0,0,0,0,10.1184,19402372
@bagage
bagage / .lessfilter
Last active February 1, 2020 16:33
.lessfilter for various input files (code highlighting, image and binary files display, …).
#!/bin/bash -x
# input preprocessor for less
function cmdexist() {
which "$1" >/dev/null
}
function colorize() {
if which pygmentize >/dev/null ; then
pygmentize -g "$1"
{
"basics": {
"name": "Thomas Louis",
"label": "Web Developer",
"summary": "I’m a **full stack web developer** who can build apps from the ground up. I've worked mostly at startups so I am use to wearing many hats. I am a very product focussed developer who priotizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://ajaxdavis.com",
"email": "thomasalwyndavis@gmail.com",
"location": {
"city": "Melbourne",
"countryCode": "AU"
@bagage
bagage / torrentcloud.sh
Last active January 8, 2019 13:13
Torrent and magnet manager for torrentcloud.eu (V2)
#!/bin/bash
# modification of an initial version from uwe-schwarz: https://github.com/uwe-schwarz/dot/blob/master/bin/torrentcloud.sh
# license: WTFPL
host="www.torrentcloud.eu"
uri="/cpv2/"
u="$(grep ^username= ~/.tcrc | cut -d= -f 2)"
p="$(grep ^password= ~/.tcrc | cut -d= -f 2)"
target="$(grep ^target= ~/.tcrc | cut -d= -f 2)"
@bagage
bagage / _liblinphone
Created March 8, 2017 08:46
autocompletion zsh/bash linphone
# Copyright (C) 2012 Belledonne Comunications, Grenoble, France
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@bagage
bagage / orienteering_replay.py
Created October 2, 2014 21:13
orienteering replay
import xml.etree.ElementTree as ET
from sys import argv
from os.path import splitext
import xml.dom.minidom as minidom
import random
from math import sin, cos, pi, atan, acos
import unicodedata
import re
@bagage
bagage / android_gui_localizer.py
Last active August 29, 2015 14:04
Make Android GUI localizable (move hardcoded android:text to res/values/string.xml and rename in .java)
#!/usr/bin/env python3
try:
import sys
import readline
import re
import fileinput
from bs4 import BeautifulSoup
except Exception as e:
print("Please install BeautifulSoup: pip3 install beautifulsoup4")