Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

{"index":{"_index":"myindex","_type":"product","_id":"base2_1"}}
{"identifier":"base2","name":"Able Knit Wide Fit Warm Lining Button - Through Asian","description":"Mauris ut elit risus, ut rutrum ligula. Nulla eu ultricies arcu. Duis eu justo quam. Donec lacinia eros sed est interdum dapibus. Pellentesque faucibus est a eros cursus elementum. Curabitur ac velit dolor. Aliquam lobortis","manufacturer":null,"price":"13932","options":[{"id":2,"values":[11,15,9,8,16]},{"id":1,"values":[2,5]}],"createdAt":1387912376}
{"index":{"_index":"myindex","_type":"product","_id":"base2_2"}}
{"identifier":"base2","name":"Bat Sleevess Cute Big Bunny Rabbit Print Asian Collection","description":"Suspendisse mi risus, mattis vel malesuada sit amet, feugiat et mi. Vivamus interdum nunc id est egestas vel luctus sem viverra. Etiam neque est, tincidunt vitae facilisis ac, varius a enim. Sed aliquet, tortor ut rutrum tincidunt, massa nibh scelerisque","manufacturer":null,"price":"7758","options":[{"id":2,"values":[7,12,16]},{"id":
DELETE myindex
PUT myindex
{
"settings": {
"analysis": {
"analyzer": {
"lowercase": {
"tokenizer": "keyword",
"filter": ["lowercase"]
},
{
"sort": [
"_score"
],
"query": {
"filtered": {
"query": {
"match_all": "[object] (stdClass: {})"
},
"filter": {
@yellow1912
yellow1912 / gist:a89ffb4ebb604b64ca5e
Last active August 29, 2015 14:16
Log file for sy
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\vu>cd C:\Programming\xampp\htdocs\demo\my-current\app\Resources\views\backend\default
C:\Programming\xampp\htdocs\demo\my-current\app\Resources\views\backend\default>sy status
No local changes.
C:\Programming\xampp\htdocs\demo\my-current\app\Resources\views\backend\default>sy status
M composer.json
C:\Programming\xampp\htdocs\demo\my-current\app\Resources\views\backend\default>sy up --debug
<?php
namespace Elastica;
use Elastica\Exception\JSONParseException;
/**
* Elastica JSON tools
*
* @package Elastica
@yellow1912
yellow1912 / bug report
Created May 20, 2015 18:39
bug report
<div class="section" id="initial-directive"><h1>Initial directive<a class="headerlink" href="#initial-directive" title="Permalink to this headline">¶</a></h1><p>Located in <code class="docutils literal"><span class="pre">nilead.common</span></code></p><div class="section" id="purpose"><h2>Purpose<a class="headerlink" href="#purpose" title="Permalink to this headline">¶</a></h2><p>Automatic initialize value to angular model through <code class="docutils literal"><span class="pre">ngModel</span></code></p></div><div class="section" id="usage"><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2><p>Apps that use this directive should include <code class="docutils literal"><span class="pre">nilead.common</span></code></p><div class="highlight-html"><div class="highlight"><pre>Restrict: ARequirements: [ngModel]</pre></div></div><div class="section" id="syntax"><h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3><div class="highlight-html"
@yellow1912
yellow1912 / command
Created November 21, 2013 19:48
just a short snippet to show an issue with pthreads on SF2
<?php
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
// first query, please make sure you modify this query to fit your purpose
$ids_array = array();
$result = mysql_query("SELECT id FROM table_name");
while($row = mysql_fetch_array($result))
{
$ids_array[] = $row['id'];
}
@yellow1912
yellow1912 / test.go
Created March 10, 2016 17:38
testing workers
package main
import (
"encoding/json"
"fmt"
"github.com/pdroog/beanstalkd"
"github.com/jeffail/tunny"
"log"
"os"
"os/exec"
nilead.namespace('nilead.design.form.font-selection', class FontSelectionDirective {
constructor() {
this.restrict = 'E';
this.require = 'ngModel';
this.scope = true;
this.bindToController = {model: '=ngModel'};
this.replace = true;
this.transclude = true;
// this.templateUrl = 'form.length-adjuster.html';