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 / Gdal2MacBrew.md
Last active July 26, 2017 08:11
Install GDAL 2.x on Mac using Homebrew

Pre-Requisites

  1. Homebrew is installed
  2. GDAL 1.x is installed using homebrew

Install GDAL 2.x

  1. Unlink GDAL 1.x
@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 :

@chringel21
chringel21 / README.md
Last active October 4, 2023 17:32
Mapbox GL + D3 overlay

Mapbox GL and geojson overlay using D3

Display geojson data as an overlay on a Mapbox GL map using D3, and switch between geographic and topologic view. It shows the Berlin metro and underground rail system (S-Bahn and U-Bahn). This is heavily inspired by Jordi Tosts mapbox-gl-d3-playground

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chringel21
chringel21 / index.html
Created August 30, 2016 13:03
Zugriffe Geoinfo Moodle
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//cdn.leafletjs.com/leaflet-0.5.1/leaflet.css'>
<link rel='stylesheet' href='http://leaflet.github.io/Leaflet.heat/dist/leaflet-heat.js'>
<script src='//cdn.leafletjs.com/leaflet-0.5.1/leaflet.js' type='text/javascript'></script>
<script src='//rawgithub.com/leaflet-extras/leaflet-providers/gh-pages/leaflet-providers.js' type='text/javascript'></script>
<script src='//harrywood.co.uk/maps/examples/leaflet/leaflet-plugins/layer/vector/KML.js' type='text/javascript'></script>