Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Jan Czernin czende

🎯
Focusing
Block or report user

Report or block czende

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tom_widget
<script type="text/javascript">
var links = {
'Blog': 'https://www.honzikuvhrad.cz/blog',
'Montáž': 'https://www.honzikuvhrad.cz/kontakt',
'Obchodní podmínky': 'https://www.honzikuvhrad.cz/Obchodni-podminky-a3_0.htm'
};
var phone = '+420 775 646 376';
var email = 'info@honzikuvhrad.cz';
(function(d, script) {
@czende
czende / slugify
Last active Feb 21, 2018
Slug generator
View slugify
/**
* Slug generator
*/
function slugify($str, $options = array()) {
// Make sure string is in UTF-8 and strip invalid UTF-8 characters
$str = mb_convert_encoding((string)$str, 'UTF-8', mb_list_encodings());
$defaults = array(
'delimiter' => '-',
'limit' => null,
View gist:6919c48850a8784f78f69106234fdf58

We create an index with:

  • two filters: synonyms_expand and synonyms_contract
  • two analyzers: synonyms_expand and synonyms_contract
  • three text fields:
    • text_1 uses the synonyms_expand analyzer at index and search time
    • text_2 uses the synonyms_expand analyzer at index time, but the standard analyzer at search time
    • text_3 uses the synonyms_contract analyzer at index and search time

.

You can’t perform that action at this time.