Skip to content

Instantly share code, notes, and snippets.

View gautiermichelin's full-sized avatar

GautierMichelin gautiermichelin

View GitHub Profile
{
"intrinsic_fields" : {
"idno" : "TEST-123",
"type_id" : 43
},
"preferred_labels" : [
{
"locale" : "en_US",
"forename" : "Walter",
"middlename" : "H.",
@gautiermichelin
gautiermichelin / gist:c5634a65334248788035
Last active August 29, 2015 14:13
Avant hack base PAFI
$vs_buf .="Ajouter une nouvelle <select name='type_id' id='caAddObjectToLotForm_type_id'>
<option value='4'>&nbsp;&nbsp;&nbsp; Mesure</option>
</select> à la session";
@gautiermichelin
gautiermichelin / detection-images-being-processed.php
Created April 16, 2015 08:47
CollectiveAccess : detection & reprocessing of media not treated by queue (either for access permission or format error)
<?php
require_once('setup.php');
require_once('app/models/ca_object_representations.php');
require_once('app/lib/core/Db.php');
$o_data = new Db();
$qr_reps = $o_data->query("
SELECT *
FROM ca_object_representations
@gautiermichelin
gautiermichelin / Eml2csv.sh
Created May 11, 2015 13:00
Eml2csv : shell script to extract To/From/Subject/Date from eml files inside a folder
#!/bin/bash
FILES=*.eml
TARGET=./emails.csv
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
echo "To\tFrom\tSubj\tDate" >> $TARGET
for f in $FILES
do
echo "Processing $f file..."
@gautiermichelin
gautiermichelin / md-toc.rb
Created July 7, 2015 06:53 — forked from JenniferMack/md-toc.rb
Traduction en français
#!/usr/bin/env ruby
toc = "# Sommaire\n"
newmd = ""
ARGF.each_line do |line|
newmd << line
next if !line.start_with?("#")
heading = line.gsub("#", "").strip
@gautiermichelin
gautiermichelin / elissa.sql
Created July 31, 2015 05:58
E-lissa (decalog) simple db structure extraction
SELECT notices.Titre,
sup1.ISBN,
sup1.Qualif_ISBN,
stitre.Sous_Titre,
para.Titre_Para,
t_forme.Titre_Forme,
t_uni.Titre_Uniforme,
langue.Lib_Langue,
langue.Code_Langue,
langue_originale.Lib_Langue AS Lib_Langue_Originale,
@gautiermichelin
gautiermichelin / objects_list_items.sql
Created August 14, 2015 05:34
CollectiveAccess SQL request : used list items inside object records
SELECT ca_list_labels.list_id,
ca_list_labels.`name`,
ca_attribute_values.item_id,
ca_list_item_labels.name_singular,
group_concat(distinct ca_attributes.row_id) as objets
FROM ca_list_labels LEFT OUTER JOIN ca_lists ON ca_list_labels.list_id = ca_lists.list_id
LEFT OUTER JOIN ca_list_items ON ca_lists.list_id = ca_list_items.list_id
LEFT OUTER JOIN ca_attribute_values ON ca_list_items.item_id = ca_attribute_values.item_id
LEFT OUTER JOIN ca_list_item_labels ON ca_list_item_labels.item_id = ca_attribute_values.item_id
LEFT OUTER JOIN ca_attributes ON ca_attribute_values.attribute_id = ca_attributes.attribute_id

Keybase proof

I hereby claim:

  • I am gautiermichelin on github.
  • I am gautiermichelin (https://keybase.io/gautiermichelin) on keybase.
  • I have a public key whose fingerprint is E7FD B88C 31D2 1C45 8096 71FF E663 1B33 C92C 9963

To claim this, I am signing this object:

<?php
/** ---------------------------------------------------------------------
* app/lib/core/Auth/Adapters/PafiExternalDB.php : External database authentication backend using Joomla for CollectiveAccess
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2014 Whirl-i-Gig
<?php
/** ---------------------------------------------------------------------
* app/lib/core/Auth/Adapters/PafiPlatformExternalDB.php : External database authentication backend using Joomla for CollectiveAccess
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2014 Whirl-i-Gig