Skip to content

Instantly share code, notes, and snippets.

View chringel21's full-sized avatar

Christian Engel chringel21

View GitHub Profile
@chringel21
chringel21 / filterArray.js
Created February 23, 2024 12:59 — forked from jherax/filterArray.js
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@chringel21
chringel21 / 00. tutorial.md
Created May 14, 2020 13:12 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@chringel21
chringel21 / underscore-debounce-example.js
Created December 19, 2019 11:03 — forked from kimmobrunfeldt/underscore-debounce-example.js
Example of using Underscore's _.debounce function
// Example of using Underscore's _.debounce function
// debounce is useful for situations where you get multiple events fired
// from one action. For example resize event is sent multiple times when
// window is resized
var reloadIfResizeChange = _.debounce(function() {
window.location.reload();
}, 200);
window.addEventListener('resize', reloadIfResizeChange);
@chringel21
chringel21 / conf.xml
Created December 16, 2019 09:13 — forked from oniram/conf.xml
How configure uuid solr with Dataimporthandler
<!-- solrconfig.xml -->
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
<str name="update.chain">uuid</str> <!-- ADD THIS LINE-->
</lst>
</requestHandler>
<updateRequestProcessorChain name="uuid">
@chringel21
chringel21 / macosx-install-php-oracle-oci8-pdo_oci.md
Created December 11, 2019 10:06 — forked from krisanalfa/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@chringel21
chringel21 / MySQL_macOS_Sierra.md
Last active July 16, 2017 14:25 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :