We are using solr for search index.
Solr need to be configured for drupal. Follow the INSTALL.txt found in the search_api_solr
module.
As a pre-requisite for running your own Solr server, you'll need Java 6 or higher.
#!/bin/bash | |
SOLR_HOST='http://192.168.50.111:8080' | |
SOLR_URL="$SOLR_HOST/solr/select?q=*:*&wt=csv&rows=0&facet&fl=mods_*" | |
curl -s -o mods_elements.txt "$SOLR_URL" | |
sed 's/,/\n/g' mods_elements.txt > mods_elements_one_per_line.txt | |
sed 's/_mlt$// ; s/_ms$// ; s/_mt$// ; s/_s$// ; s/_ss$// ; s/_t$// ; s/_all$// ; s/_dt$// ; s/_mdt$//' mods_elements_one_per_line.txt > mods_elements_one_per_line.txt.pruned | |
sort mods_elements_one_per_line.txt.pruned > mods_elements_one_per_line.txt.pruned.sorted | |
uniq mods_elements_one_per_line.txt.pruned.sorted > mods_elements.txt |
#!/bin/bash | |
migrate_loop() | |
{ | |
# Better readability with separation. | |
echo "========================"; | |
# Get the output of the drush status. | |
drush_output=$(drush ms "$1" --format string); | |
# Split output string into an array. |
#!/bin/bash | |
## | |
## New IP login notification script | |
## 2009-11-20 00:28 Samuele ~redShadow~ Santi | |
## 2018-06-04 12:53 ElliotNB | |
## 2018-10-17 17:55 ElliotNB - bug fixes for non-interactive sessions and `sudo su` commands | |
## Licensed under GPL | |
## | |
## This script will email the contact specified below whenever | |
## a user logs into the system from a new IP address. The email will contain the |
<?php | |
// thx drupal8.ovh | |
//// 1) How to get the current language in Drupal 8 | |
//To get the lanuage code: | |
$language = \Drupal::languageManager()->getCurrentLanguage()->getId(); | |
//To get the language name: | |
$language = \Drupal::languageManager()->getCurrentLanguage()->getName(); |
#!/usr/bin/env python | |
from __future__ import print_function | |
import re | |
import json | |
import argparse | |
from collections import defaultdict | |
import requests | |
parser = argparse.ArgumentParser( |
#!/bin/bash | |
# https://github.com/n8felton/DeployStudio/blob/master/DeployStudio%20Admin.app/Contents/Frameworks/DSCore.framework/Versions/A/Resources/Tools/osxcleanup.sh | |
# https://managingosx.wordpress.com/2009/01/23/image-cleanup-script/ | |
# https://wikis.uit.tufts.edu/confluence/display/exchange2010/Remove+account+in+Single+User+mode | |
# Copy this script to /private/var/root/.profile | |
echo Check and mount disk | |
/sbin/fsck -fy | |
/sbin/mount -uw / |
# | |
# How to get rid of the locale warning on raspberry pi | |
# | |
sudo sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" -i /etc/locale.gen | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale en_US.UTF-8 | |
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |