Skip to content

Instantly share code, notes, and snippets.

@funkatron
funkatron / vuejs-load-ajax-template.js
Created December 6, 2018 22:28
Simple JS function to dynamically load an HTML template for a VueJS component via AJAX
/**
* Registers a Vue component. Can take a `templateUrl` in the componentDef that is loaded and resolved to `template`
* @param {string} name
* @param {Object} componentDef
*/
function registerVueComponent(name, componentDef) {
if (componentDef.templateUrl) {
Vue.component(name, function (resolve, reject) {
// retrieve the template via axios async call
axios.get(componentDef.templateUrl)
@codedokode
codedokode / !Как установить сфинкс.md
Last active May 3, 2024 08:50
Как установить и настроить сфинкс.

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

Скачиваем сфинкс (берем версию с 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,