Skip to content

Instantly share code, notes, and snippets.

GautierMichelin gautiermichelin

Block or report user

Report or block gautiermichelin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Zendesk-Statushero.php
<?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 Oct 12, 2018
Vider les index CollectiveAccess
View clear_indexes.sql
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 Sep 30, 2018 — forked from waja/jessie2stretch.sh
Migration from Debian Jessie to Stretch
View jessie2stretch.sh
# 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
Customized version of Pawtucket IIIFService.php to avoid a load error
View IIIFService.php
<?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
Test de connexion à une instance de CollectiveAccess (Providence)
View test_connexion_ca.php
#!/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 Apr 12, 2018
Export in TSV all the screens and the bundles from a CollectiveAccess installation, using a user id (useful for reports)
View export_uis_tsv.php
<?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) {
@gautiermichelin
gautiermichelin / install_ffmpeg.sh
Last active Mar 3, 2018
Install FFMPEG on Debian 9
View install_ffmpeg.sh
apt-get update -qq && apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtheora-dev \
@gautiermichelin
gautiermichelin / test-medias-clean.php
Last active Feb 26, 2018
test medias for CollectiveAccess
View test-medias-clean.php
<?php
require_once('setup.php');
require_once(__CA_MODELS_DIR__."/ca_objects.php");
require_once(__CA_MODELS_DIR__."/ca_lists.php");
require_once(__CA_MODELS_DIR__."/ca_list_items.php");
$list = new ca_lists("object_types");
// Getting list item id of the first object type defined
$first_object_type = reset(array_keys($list->getItemsForList("object_types")));
@gautiermichelin
gautiermichelin / index.html
Last active May 3, 2019
Maintenance page Idéesculture
View index.html
<html>
<head>
<title>Id&eacute;esculture</title>
<link href="https://fonts.googleapis.com/css?family=Encode+Sans:200,400,800" rel="stylesheet">
<style>
body {
font-family: "Encode Sans", helvetica, arial, sans-serif;
font-weight:400;
margin:20px 240px;
@gautiermichelin
gautiermichelin / pdf2png
Created Nov 24, 2017
pdf2png as a simple command, using ghostscript and imagemagick
View pdf2png
#!/bin/bash
PDF=$1
PNG=$2
convert -density 300x300 -units pixelsperinch $PDF -background white -alpha background -alpha off $PNG
You can’t perform that action at this time.