Skip to content

Instantly share code, notes, and snippets.

View darkleaf's full-sized avatar

Mikhail Kuzmin darkleaf

View GitHub Profile
GIT
remote: git://github.com/pludoni/wrong.git
revision: c6b5de060a751bdcd2ad1d47dedfbd48cced9b99
specs:
wrong (0.7.0)
diff-lcs (~> 1.2.0)
predicated (~> 0.2.6)
ruby2ruby (>= 2.0.1)
ruby_parser (>= 3.0.1)
sexp_processor (>= 4.0)
---
_index: chess
_type: people
_id: 17
en: true
ru: true
name_en: Garry
surname_en: Kasparov
biography_en: |
<p>\r\nBorn April 13,&nbsp;1963, in Baku. Began to play chess
@darkleaf
darkleaf / README.md
Last active August 29, 2015 13:58 — forked from clayzermk1/README.md

A representation of the current time of year using the Sun, Earth, and Moon.

The position of the Earth in orbit around the Sun indicates the hour of year. The Earth itself is a pie chart indicating the second of day. The Moon's position in orbit around the Earth indicates the hour of month. The time is updated every second.

CodePen demo

MIT License

1. 192.168.30.1 0.0% 9 2.0 4.2 1.9 21.1 6.3
2. lo0.bras2.ulrt.net 0.0% 9 4.5 4.4 3.2 7.4 1.6
3. 79.126.125.93 0.0% 9 2.8 3.9 2.7 7.2 1.6
4. ae1.nnov.igw1.vt.ru 0.0% 9 22.3 22.6 21.8 25.8 1.3
5. 188.254.78.5 37.5% 8 29.6 31.0 29.3 34.7 2.1
6. xe-11-0-1.frkt-ar2.intl.ip.rostelecom.ru 28.6% 8 71.2 73.0 71.1 78.2 3.0
7. 195.69.147.140 0.0% 8 83.1 83.0 82.3 84.7 0.7
8. 162.159.243.76
facebook.com
только ростелеком
с клиентской машины
Host Loss% Snt Last Avg Best Wrst StDev
1. 192.168.30.1 0.0% 10 4.3 25.3 2.0 133.1 48.1
2. lo0.bras2.ulrt.net 0.0% 10 3.1 10.4 3.0 65.8 19.6
3. 79.126.125.93 0.0% 10 2.8 3.7 2.5 5.7 1.1
4. ae1.nnov.igw1.vt.ru 0.0% 10 21.7 34.3 21.7 141.9 37.8
@darkleaf
darkleaf / test.md
Last active August 29, 2015 14:02
markdown test

anchor link

asdfasdfsa asdf sadf sadf sadf asd sadf sadf sa asdf sadf asdf sdaf asdf asdf

Elasticsearch - поисковый движок с json rest api, использующий Lucene и написанный на Java. Описание всех преимуществ этого движка доступно на официальном сайте. Далее по тексту будем называть Elasticsearch как ES.

Подобные движки используются при сложном поиске по базе документов. Например, поиск с учетом морфологии языка или поиск по geo координатам.

В этом уроке я расскажу про основы ES на примере индексации постов блога. Покажу как фильтровать, сортировать и искать документы.

Что бы урок был максимально кроссплатформенным все запросы к ES я буду делать с помощью CURL. Так же есть плагин для google chrome.

По тексту урока расставлены ссылки на другие источники. В конце урока размещены ссылки для быстрого доступа к документации. Определения незнакомых терминов можно прочитать в [глоссарии](http://www.elasticsearch.org/guide/en/elasticsearch/reference/curre

#!/bin/sh
ls -l *.gz | \
awk '
{
filename = $9;
"date +%s"|getline current_timestamp;
split(filename,components,"-");
timestamp=components[1];
if((timestamp + 6*60*60) < current_timestamp){
module Browserify
mattr_accessor(:base_dir) { "app/assets/browserify" }
# mattr_accessor(:transform) { 'babelify' }
mattr_accessor(:command) { '$(npm bin)/browserifyinc' }
class << self
def inline_bundle(context, entry: nil, require: nil, external: nil, transform: nil, source_map: true)
p 'inline_bundle'
p entry