Give pidenv
the PID of a running program and it will print (with correct line breaks) its environment.
# pidenv 1
HOME=/
TERM=linux
BOOT_IMAGE=/bzImage-3.14.32-xxxx-grs-ipv6-64
#!/bin/env python | |
import sys | |
import os | |
import json | |
def clean_lines(lines): | |
clean_lines=[] | |
# TODO: a map/reduce or a comprehension might be better | |
for line in lines: |
{ | |
"mappings": { | |
"tweet": { | |
"properties": { | |
"created_at": { | |
"format": "YYYY-MM-dd HH:mm:ss Z", | |
"type": "date" | |
}, | |
"entities": { | |
"properties": { |
#!/bin/sh | |
set -e | |
if [ ! "`id -u`" -eq 0 ]; then | |
echo "Must be root !" | |
exit 0 | |
fi | |
MYSQLUSER=root |
Give pidenv
the PID of a running program and it will print (with correct line breaks) its environment.
# pidenv 1
HOME=/
TERM=linux
BOOT_IMAGE=/bzImage-3.14.32-xxxx-grs-ipv6-64
def my_method(arg1:, arg2:) | |
# how to get the keys/values or arguments, when they also exist as a method? | |
# instance_variable_get("…"), and instance_variable_names are for instance variables | |
end | |
# concrete example : | |
def go_to(step:, options: []) | |
# when using Pry, the step variable is shadowed by the debugger `step` method | |
end |
L'arnaqueur, se faisant passer pour Jean-Bernard F., m'écrit sur l'adresse d'assistance du site pour lequel je travaille.
Le personne (son addresse est en signature de chaque mail de l'arnaqueur) existe vraiment, c'est donc probablement une usurpation d'identité. Je l'ai prévenu par d'autres moyens.
Bonjour,
J'aimerais te parler sérieusement es tu disponible par mail. Je te demande de garder surtout la confidentialité de mon courriel n'en parle à personne je t'en prie.
Merci d'avance.
def prelude | |
if block_given? | |
final { |name| | |
yield(name) | |
} | |
else | |
final | |
end | |
end |
#!/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}'` |
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
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)", |