This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X DELETE localhost:9200/test | |
| curl -X PUT localhost:9200/test -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { | |
| "analyzer" : { | |
| "myanalyzer" : { | |
| "type" : "custom", | |
| "tokenizer" : "lowercase", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package database; | |
| import java.io.*; | |
| import java.sql.PreparedStatement; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.sql.Types; | |
| import java.util.UUID; | |
| import org.apache.commons.io.IOUtils; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| listen 80; | |
| server_name A.com; | |
| root /var/www/kibana; | |
| # Set image format types to expire in a very long time | |
| location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ { | |
| access_log off; | |
| expires max; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HopSearchEnabledCondition implements Condition { | |
| @Override | |
| public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { | |
| PropertyResolver resolver = conditionContext.getEnvironment(); | |
| // renvoie toujours null, les propriétés ne sont jamais résolus | |
| return "true".equalsIgnoreCase(resolver.getProperty("hopsearch.enabled")); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.hopwork.hopsearch; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
| import org.springframework.context.annotation.ComponentScan; | |
| import org.springframework.context.annotation.Configuration; | |
| @Configuration | |
| @EnableAutoConfiguration | |
| @ComponentScan(value = {"com.hopwork", "com.lateralthoughts"}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: analytics | |
| sudo: true | |
| vars_files: | |
| - ../target/classes/version.yml | |
| tasks: | |
| - name: Ensure hopwork log folder exist | |
| file: path=/var/log/hopwork/analytics/ state=directory group=www-data owner=www-data | |
| - name: Ensure hopwork folder exist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="alternate" href="http://www.hopwork.fr" hreflang="fr-fr"/> | |
| <link rel="alternate" href="http://fr.hopwork.ca" hreflang="fr-ca"/> | |
| <link rel="alternate" href="http://fr.hopwork.com" hreflang="fr"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=UTF8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=UTF8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $number = 1234.56; | |
| // Notation anglaise (par défaut) | |
| $english_format_number = number_format($number); | |
| // 1,235 Notation française | |
| $nombre_format_francais = number_format($number, 2, ',', ' '); | |
| // 1 234,56 |
OlderNewer