I hereby claim:
- I am jlecour on github.
- I am jlecour (https://keybase.io/jlecour) on keybase.
- I have a public key whose fingerprint is 6354 41B7 AE3D AF2F B458 B6EB F2D3 E9D7 13FF DD52
To claim this, I am signing this object:
cd /tmp | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb.sha1.txt | |
grep -f elasticsearch-1.0.1.deb.sha1.txt <(sha1sum elasticsearch-1.0.1.deb) && echo "checksum OK" | |
mount -o remount,rw /usr | |
service elasticsearch stop | |
dpkg -i elasticsearch-1.0.1.deb | |
cd /usr/share/elasticsearch/ | |
bin/plugin -remove mobz/elasticsearch-head |
I hereby claim:
To claim this, I am signing this object:
def find_each(options = {}, &block) | |
search_options = {} | |
search_options[:index] = options.fetch(:index) { default_index(options) } | |
search_options[:body] = options.fetch(:body) { | |
{ query: { match_all: {} } } | |
} | |
search_options[:scroll] = options.fetch(:scroll) { "5m" } | |
search_options[:search_type] = "scan" | |
if options.key?(:_source) |
roidrage: Is there a CSS trick that allows me to phase out text that overflows a box? Like a shadow over the last couple of chars. [http://twitter.com/roidrage/status/464692600910651392]
let's say you have this html snippet :
<div>
A text that is too long to fit it's container
</div>
def distance_script_field(name: "distance", field: "lat_lng", lat:, lng:) | |
valid_pattern = /\A[\w]+\Z/ | |
valid_pattern.match(name) or fail(ArgumentError, "Invalid value for name: #{name.inspect}") | |
valid_pattern.match(field) or fail(ArgumentError, "Invalid value for field: #{field.inspect}") | |
Float(lat) rescue raise(ArgumentError, "Invalid value for lat: #{lat.inspect}") | |
Float(lng) rescue raise(ArgumentError, "Invalid value for lng: #{lng.inspect}") | |
{ | |
name => { | |
script: "doc['#{field}'].arcDistanceInKm(lat,lon)", |
chibani: @jlecour il te faut quoi ? Un champ date, 2 champs number et stocker en bdd locale ? Ensuite un bouton pour demander le push vers ton ES ?
sgruhier: @jlecour This are 2 difference things. You can do offline webpage in any technology you want.
duckmole: @jlecour http://www.airpair.com/js/javascript-framework-comparison
franckverrot: @jlecour depends on the effort you wanna put into this IMHO. I worked a lot with both and I personally prefer Ember.
gcouprie: @jlecour React. Ca te simplifie la gestion de la donnée
#!/bin/sh | |
set -e | |
[ -n "$DEBUG" ] && set -x | |
CAP_BIN="bin/cap" | |
CAP_COMMAND="${CAP_BIN} production" | |
# git name-rev is fail | |
CURRENT=`git branch | grep '\*' | awk '{print $2}'` |
def bash_format(formats, text) | |
res = "\e[0" | |
colors = { :red =>";31", :yellow => ";33", :green => ";32" } | |
styles = { :bold => ";1", :underline => ";4" } | |
if formats.is_a?(Array) || formats.is_a?(Hash) | |
colors.each { |k,v| res += v if formats.include?(k) } | |
styles.each { |k,v| res += v if formats.include?(k) } | |
elsif formats.is_a?(Symbol) | |
colors.each { |k,v| res += v if formats == k } | |
styles.each { |k,v| res += v if formats == k } |
#!/usr/bin/env ruby | |
# | |
# A hook script to verify that only syntactically valid ruby code is commited. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Put this code into a file called "pre-commit" inside your .git/hooks | |
# directory, and make sure it is executable ("chmod +x .git/hooks/pre-commit") | |
# |
J'ai un dégoût personnel pour les conférences le week-end. Pour moi, une conférence le week-end garanti que je vais "bosser" 12 jours d'affilée. | |
J'ai bien conscience que cette opinion n'est pas universelle. | |
Certaines personnes ont des difficultés pour "décrocher" pour aller à des conférences. Ces situations ont bien l'air d'une mécompréhension des responsabilités d'un développeur logiciel. Une partie de votre boulot (de développeur logiciel) est de rester à jour technologiquement. Ça signifie passer du temps de recherche durant votre journée. | |
(à peu près piqué directement à Ward sur le [déficit technique](http://c2.com/cgi/wiki?WardExplainsDebtMetaphor)) | |
Si vous passez toute votre journée à coder, sans jamais regarder du coté des nouvelles choses, vous accroissez votre déficit technique. À court terme (disons la dernière semaine avant une release), ça a du sens de prendre un peu de déficit. Par contre, à long terme, sans un minimum d'investissement, l'intérêt (où l'intérêt est égal à la distance entre vos |