Skip to content

Instantly share code, notes, and snippets.

View gautiermichelin's full-sized avatar

GautierMichelin gautiermichelin

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Supraheader idéesculture</title>
</head>
<body style="background-color: white;">
<div id="supranav" style="padding:0;margin:0;">
<style>
#!/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 / Zendesk-Statushero.php
Created March 6, 2019 16:45
Zendesk to Statushero
<?php
/*
In Zendesk :
- go to Settings > Extensions > Targets (Paramètres > Extensions > Cibles)
- add a target
- URL target
- Title : Zendesk-Statushero
- URL : https://DOMAIN/PATH/TO/THIS/SCRIPT?assignee={{ticket.assignee.name}}&id={{ticket.id}}&org={{ticket.organization.name}}&title={{ticket.title}}
@gautiermichelin
gautiermichelin / clear_indexes.sql
Created October 12, 2018 05:26
Vider les index CollectiveAccess
SET FOREIGN_KEY_CHECKS=0;
truncate table ca_sql_search_word_index;
truncate table ca_sql_search_words;
SET FOREIGN_KEY_CHECKS=1;
@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 / IIIFService.php
Created May 14, 2018 19:13
Customized version of Pawtucket IIIFService.php to avoid a load error
<?php
/** ---------------------------------------------------------------------
* app/lib/ca/Service/IIIFService.php
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2016-2017 Whirl-i-Gig
@gautiermichelin
gautiermichelin / test_connexion_ca.php
Last active May 7, 2018 15:43
Test de connexion à une instance de CollectiveAccess (Providence)
#!/usr/bin/php
<?php
error_reporting(E_ALL);
//The username or email address of the account.
define('USERNAME', $argv[1]);
print "\n".
"Test de connexion CollectiveAccess\n".
"----------------------------------\n".
"2018, idéesculture\n\n".
@gautiermichelin
gautiermichelin / export_uis_tsv.php
Last active April 12, 2018 08:30
Export in TSV all the screens and the bundles from a CollectiveAccess installation, using a user id (useful for reports)
<?php
require_once("setup.php");
$vt_user = new ca_users(16);
$vt_list_item = new ca_list_items();
print "Table CollectiveAccess | Editeur\tEcran de saisie\tLibellé du champs ou conteneur\tIdentifiant du champs ou conteneur\tType de données\n";
function getScreens($idno) {