Skip to content

Instantly share code, notes, and snippets.

View Daniel-KM's full-sized avatar

Daniel-KM

  • France
  • 00:49 (UTC +02:00)
View GitHub Profile
@Daniel-KM
Daniel-KM / solr.service
Last active April 10, 2024 13:54 — forked from gadelkareem/solr.service
systemd service file for Apache SOLR
# put this file in /etc/systemd/system/ as root
# below paths assume solr installed in /opt/solr, SOLR_PID_DIR is /data
# and that all configuration exists in /etc/default/solr.in.sh which is the case if previously installed as an init.d service
# change port in pid file if differs
# note that it is configured to auto restart solr if it fails (Restart=on-faliure) and that's the motivation indeed :)
# to switch from systemv (init.d) to systemd, do the following after creating this file:
# sudo systemctl daemon-reload
# sudo service solr stop # if already running
# sudo systemctl enable solr
# systemctl start solr
@Daniel-KM
Daniel-KM / test_unicode.php
Created June 9, 2018 05:18
Check and fix Unicode issues on a web server with php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Check Unicode on a web server with php</h1>
<p>If your filenames requires characters with diacritics or any Unicode characters and not only the strict latin characters (26 letters + 10 numbers + some symbols and punctuation marks), the web server should be checked and fixed.</p>
@Daniel-KM
Daniel-KM / ExternalImageMagick.php
Last active August 29, 2015 14:13
Hack to use Omeka on some shared hosts (needed with Omeka < 2.3), as OVH (replace application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php)
<?php
/**
* Adaptation pour que le serveur partagé d'OVH puisse créer les fichiers dérivés.
*
* @see application/libraries/Omeka/File/Derivative/Strategy/ExternalImageMagick.php
*
* @copyright Copyright 2007-2014 Roy Rosenzweig Center for History and New Media
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
@Daniel-KM
Daniel-KM / SpecificDerivativePlugin.php
Last active August 29, 2015 14:06
Example to use to add one or multiple specific derivative types in Omeka, for example mini square thumbnails (see https://github.com/omeka/Omeka/pull/638).
<?php
/**
* Specific Derivative
*
* Example to use to add one or multiple specific derivative types in Omeka, for
* example mini square thumbnails.
*
* It creates the directory automatically. If the path exists, this plugin is
* useless, except the form to set constraints of the specific types.
*
@Daniel-KM
Daniel-KM / Creator.php
Last active May 18, 2018 11:19
Allow to use Omeka when server forbids to use ImageMagick via command line (See http://omeka.org/forums/topic/imagemagick-as-php-module). Simply replace application/libraries/Omeka/File/Derivative/Image/Creator.php with this file. Some work needs to be done in order to be able to select it via the admin UI.
<?php
/**
* Omeka
*
* @copyright Copyright 2007-2012 Roy Rosenzweig Center for History and New Media
* @copyright Copyright 2013 Daniel Berthereau for Mines ParisTech
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**