Skip to content

Instantly share code, notes, and snippets.

View gautiermichelin's full-sized avatar

GautierMichelin gautiermichelin

View GitHub Profile
#!/usr/bin/env ruby
shutdown = false
cnf_path = '/usr/local/etc/my_ramdisk.cnf'
ramdisk_path = '/Volumes/RAMDisk'
loop { case ARGV[0]
when 'shutdown' then ARGV.shift; shutdown = true
else break
end; }
@gautiermichelin
gautiermichelin / backup-mariadb.sh
Last active May 3, 2021 11:46 — forked from karolyi/backup-mariadb.sh
Fast backup/restore mysql databases
#!/usr/bin/env bash
mariabackup --stream=xbstream --backup --user root|pigz >mariadb-backup.gz
@gautiermichelin
gautiermichelin / my.cnf
Last active November 26, 2020 10:35 — forked from zabustak/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
# Edited by zabustak
# Edited by GautierMichelin, idéesculture
#
# The settings marked with a specific comment or the word "UPD" (after the value)
# should be adjusted for your system by using database diagnostics tools like:
#
# https://github.com/major/MySQLTuner-perl
@gautiermichelin
gautiermichelin / jessie2stretch.sh
Last active September 30, 2018 15:02 — forked from waja/README.md
Migration from Debian Jessie to Stretch
# Release notes : http://www.debian.org/releases/stretch/releasenotes
# upgrade to UTF-8 locales (http://www.debian.org/releases/stretch/amd64/release-notes/ap-old-stuff.en.html#switch-utf8)
dpkg-reconfigure locales
# remove unused config file
rm -rf /etc/network/options /etc/environment
# migrate over to systemd (before the upgrade) / you might want reboot if you install systemd
@gautiermichelin
gautiermichelin / transfer.fish
Created July 5, 2017 18:57 — forked from nl5887/transfer.fish
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@gautiermichelin
gautiermichelin / mysql_backup.sh
Created June 10, 2017 05:24 — forked from guiyomh/mysql_backup.sh
Mysql Backup data and schema
#!/bin/bash
# Configuration de base: datestamp e.g. YYYYMMDD
DATE=$(date +"%Y%m%d")
# Dossier où sauvegarder les backups (créez le d'abord!)
BACKUP_DIR="/backup/mysql"
@gautiermichelin
gautiermichelin / backup.sh
Created June 10, 2017 05:24 — forked from amityweb/backup.sh
Incremental RSync Backup with 14 Day Retention for Databases and Home Folder
#!/bin/sh
rsync="/usr/bin/rsync"
################################
# VARIABLES
################################
# General Variables
remote_server="yourserver.com"
remote_port="22"
@gautiermichelin
gautiermichelin / LICENSE.txt
Last active March 21, 2017 15:29 — forked from mejackreed/LICENSE.txt
Leaflet-IIIF Annotation Example
MIT License
Copyright (c) 2016 Jack Reed
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@gautiermichelin
gautiermichelin / .block
Created November 7, 2016 17:00 — forked from mbostock/.block
Heatmap (Canvas, JSON)
license: gpl-3.0
@gautiermichelin
gautiermichelin / README.md
Last active November 7, 2016 09:24 — forked from rfilmyer/README.md
D3 Sun Heatmap example

This is a D3.js Heatmap example showing how the highest sun position of the day (which directly correlates with average temperature) changes over the year depending on the latitude of the place. The actual temperature chart would be shifted to the right a bit beacuse of thermal lag.

The data for the chart is calculated using SunCalc.