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
@czende
czende / docker-compose.yaml
Created Sep 11, 2019
GitLab with runner via docker-compose
View docker-compose.yaml
version: '3.7'
services:
gitlab-web:
image: gitlab/gitlab-ce:latest
container_name: gitlab-web
hostname: gitlab-web
volumes:
- './gitlab-config:/etc/gitlab'
- './gitlab-logs:/var/log/gitlab'
@czende
czende / check.sh
Last active Sep 11, 2019
Check version by git tag in pipeline
View check.sh
#!/bin/sh
APP_VERSION="$(git tag --contains $BITBUCKET_COMMIT)"
ENVIRONMENT="$1"
STG_REGEX="^v.*\\-.*$"
PROD_REGEX="^v.[^-]*$"
# Check commit tag
if [ "$APP_VERSION" == "" ] ; then
echo "ERROR: Commit doesn't contain TAG!";
@czende
czende / slugify.php
Last active Sep 11, 2019
Slug generator
View slugify.php
/**
* 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.