Skip to content

Instantly share code, notes, and snippets.

@vgrish
vgrish / !Как установить сфинкс.md
Created August 22, 2024 12:24 — forked from codedokode/!Как установить сфинкс.md
Как установить и настроить сфинкс.

Как установить и настроить сфинкс.

Скачиваем сфинкс (берем версию с MySQL и со стеммингом на 15 языков Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support соответствующую битности твоей ОС), распаковываем например в d:\temp\s\

На этом установка sphinx завершена. В дебиане просто делаем sudo apt-get install sphinxsearch.

Создаем таблицы:

CREATE TABLE news 

(id INT(10) AUTO_INCREMENT PRIMARY KEY, topic INT(10) NOT NULL, header VARCHAR(200) NOT NULL,

Установка и настройка Manticore 3.5.5 на Ubuntu 20.04

Прежде надо подготовить web-сервер.

Возможно, для работы потребуется установить еще либы:

sudo apt install default-libmysqlclient-dev
@vgrish
vgrish / manticore.conf
Created August 22, 2024 12:11 — forked from Tkachenko-Ivan/manticore.conf
Пример конфигурационного файла Sphinx Search или Manticore Search (совместимы), для поддержки фонетических алгоритмов: Soundex, улучшенный Soundex, NYSIIS, Daitch-Mokotoff Soundex, Caverphone, Metaphone, русский Metaphone
searchd
{
listen = 9306:mysql41
listen = /var/run/mysqld/mysqld.sock:mysql41
listen = 9308:http
log = /var/log/manticore/searchd.log
query_log = /var/log/manticore/query.log
binlog_path = /var/log/manticore
pid_file = /var/run/manticore/searchd.pid
mysql_version_string = 5.0.0
@vgrish
vgrish / ral_standard.csv
Created February 21, 2024 08:32 — forked from evgeni17/ral_standard.csv
RAL Standard Color Table (CSV)
RAL RGB HEX German English French Spanish Italian Nederlands
RAL 1000 190-189-127 #BEBD7F Grünbeige Green beige Beige vert Beige verdoso Beige verdastro Groenbeige
RAL 1001 194-176-120 #C2B078 Beige Beige Beige Beige Beige Beige
RAL 1002 198-166-100 #C6A664 Sandgelb Sand yellow Jaune sable Amarillo arena Giallo sabbia Zandgeel
RAL 1003 229-190-001 #E5BE01 Signalgelb Signal yellow Jaune de sécurité Amarillo señales Giallo segnale Signaalgeel
RAL 1004 205-164-052 #CDA434 Goldgelb Golden yellow Jaune or Amarillo oro Giallo oro Goudgeel
RAL 1005 169-131-007 #A98307 Honiggelb Honey yellow Jaune miel Amarillo miel Giallo miele Honinggeel
RAL 1006 228-160-016 #E4A010 Maisgelb Maize yellow Jaune maïs Amarillo maiz Giallo polenta Maisgeel
RAL 1007 220-156-000 #DC9D00 Narzissengelb Daffodil yellow Jaune narcisse Amarillo narciso Giallo narciso Narcissengeel
RAL 1011 138-102-066 #8A6642 Braunbeige Brown beige Beige brun Beige pardo Beige marrone Bruinbeige
{
"RAL 1000" :"Зелено-бежевый",
"RAL 1001" :"Бежевый",
"RAL 1002" :"Песочно-желтый",
"RAL 1003" :"Сигнальный желтый",
"RAL 1004" :"Золотисто-желтый",
"RAL 1005" :"Медово-желтый",
"RAL 1006" :"Кукурузно-желтый",
"RAL 1007" :"Желтый нарцисс",
"RAL 1011" :"Коричнево-бежевый",
<?php
/** @var modX $modx */
/** @var array $scriptProperties */
switch ($modx->event->name) {
// расчет стоимости события
case "UserEventsOnBeforeGetOrderCost":
/** @var UserEventsOrderInterface $orderHandler */
$orderHandler = $modx->getOption("order", $scriptProperties);
if (!window.FB) window.FB = {
_apiKey: null,
_session: null,
_userStatus: "unknown",
_logging: true,
_inCanvas: window.location.search.indexOf("fb_sig_in_iframe=1") > -1 || window.location.search.indexOf("session=") > -1 || window.location.search.indexOf("signed_request=") > -1 || window.name.indexOf("iframe_canvas") > -1 || window.name.indexOf("app_runner") > -1,
_https: window.name.indexOf("_fb_https") > -1,
_domain: {
api: "https://api.facebook.com/",
api_read: "https://api-read.facebook.com/",
<?php
public function change($key, $count, $options, $comment)
{
if (array_key_exists($key, $this->cart)) {
if (isset($count) && !is_null($count) && $count <= 0)
return $this->remove($key);
else if(isset($count) && !is_null($count) && $count > 0)
{
if ($count > $this->config['max_count']) {
@vgrish
vgrish / index.html
Created March 29, 2016 07:42 — forked from anonymous/index.html
JS Bin uikit slideshow + counts // source http://jsbin.com/pewuwi
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="uikit slideshow + counts">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/js/uikit.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.25.0/js/components/slideshow.js"></script>
@vgrish
vgrish / common.js
Last active March 11, 2016 10:28 — forked from Ibochkarev/common.js
scrollCurrentLink
$(document).ready(function () {
$(document).on("scroll", onScroll);
//smoothscroll
$('a[href^="#"][data-anchor="1"]').on('click', function (e) {
e.preventDefault();
$(document).off("scroll");
$('a').each(function () {
$(this).removeClass('active');