4345 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
◄Older
page 48 / 218
Newer►
  • Note: Docker stop non standard software (ignoring SIGTERM)

    docker stop command send SIGTERM to pid1 inside the container to let a chance to stop gracefully (https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers/)
    Unfortunatly some software ignore SIGTERM and need to be stopped by their own command (hello opendj)

    To do so, in the Dockerfile, in the CMD, I use a script like this :
    /thecommand/tostart/thesoftware/inbackground
    trap "/thecommand/tostop/thesoftware" SIGTERM
    while true; do sleep 1; done

    so my script is run with PID1, docker stop sends SIGTERM, my script catch (trap) the signal, and run the command to stop gracefully

    16 février 2017 à 14:16:44 UTC+1 - permalink - archive.org - https://links.infomee.fr/?Mxx31A
    catch docker ini script signal stop trap
  • impôts des frontaliers à Genève : déduire ses frais réels grâce au statut de quasi-résident | Travailler en Suisse

    http://quasi-resident.frontalier.org/forms/1.php
    http://www.eurexsuisse.com/fr/4/fiscalite/15/fiscalite.html
    Groupement assoc http://www.frontalier.org/

    16 février 2017 à 08:34:43 UTC+1 - permalink - archive.org - http://www.travailler-en-suisse.ch/quasi-resident-frontaliers.html
    suisse
  • Note: git hook to have issue number in commit message

    cat prepare-commit-msg
    NAME=$(git branch | grep '' | sed 's/ //'|cut -d'/' -f2|cut -d'-' -f1,2)
    echo "$NAME $(cat "$1")" > "$1"

    for dir in $(ls); do cp prepare-commit-msg $dir/.git/hooks/prepare-commit-msg; done

    !/bin/sh

    text=" [FIX] ()
    🔄 [MOD] ()
    ✅5 [ADD] ()
    🔀 [TEST] ()
    [DOC] ()"

    echo "$text $(cat "$1")" > "$1"

    14 février 2017 à 15:51:37 UTC+1 * - permalink - archive.org - https://links.infomee.fr/?GZFLaQ
    git hook
  • Note:

    DELIM=$(echo -en "\001");

    sed -i "s${DELIM}SEARCH${DELIM}${VAR}${DELIM}" $config

    14 février 2017 à 15:45:21 UTC+1 - permalink - archive.org - https://links.infomee.fr/?3DXbeg
    delimiter sed
  • Amazon EBS Update – New Elastic Volumes Change Everything | AWS Blog

    aws <3

    14 février 2017 à 13:33:04 UTC+1 - permalink - archive.org - https://aws.amazon.com/blogs/aws/amazon-ebs-update-new-elastic-volumes-change-everything/
    aws ebs
  • thumbnail
    Undoing a git rebase - Stack Overflow

    The easiest way would be to find the head commit of the branch as it was immediately before the rebase started in the reflog...

    git reflog

    and to reset the current branch to it (with the usual caveats about being absolutely sure before reseting with the --hard option).

    Suppose the old commit was HEAD@{5} in the ref log:

    git reset --hard HEAD@{5}

    13 février 2017 à 12:27:23 UTC+1 - permalink - archive.org - http://stackoverflow.com/questions/134882/undoing-a-git-rebase
    git rebase
  • thumbnail
    GitHub - jamesrwhite/minicron: Monitor your cron jobs 👨🏻‍💻

    Pour avoir une vue globale des crins qui tournent sur différents serveurs

    10 février 2017 à 22:12:25 UTC+1 - permalink - archive.org - https://github.com/jamesrwhite/minicron
    cron ui
  • library/buildpack-deps - Docker Hub

    TIL what is this offical repository :

    Only debian with some useful package to build dependencies (needed when you install some gem for example)

    For example ruby:2.3 Dockerfile use a buildpack-deps image

    10 février 2017 à 16:27:52 UTC+1 - permalink - archive.org - https://hub.docker.com/_/buildpack-deps/
    debian docker ruby
  • Note: EC2 metadata

    Several ways to get metadata (like ip address) when you're connected to an EC2:

    /opt/aws/bin/ec2-metadata

    curl http://169.254.169.254/latest/meta-data/

    10 février 2017 à 12:27:56 UTC+1 - permalink - archive.org - https://links.infomee.fr/?-mOoAQ
    aws ec2 metadata
  • Note: function pour log en bash

    Je me mets ça de côté pour gagner du temps la prochaine fois

    !/bin/bash

    logfile=/tmp/logfile.log
    errorfile=/tmp/error.log

    function log() {
    echo -e "\e[34m\e[1m[$(date +%Y-%m-%d) $(date +%H:%M:%S)] $1\e[0m" | tee -a /tmp/logfile.log
    }

    function logerror() {
    echo -e "\e[91m\e[1m[$(date +%Y-%m-%d) $(date +%H:%M:%S)] $1\e[0m" | tee -a /tmp/logfile.log
    }

    log "prout"
    logerror "pwet"

    10 février 2017 à 10:29:21 UTC+1 - permalink - archive.org - https://links.infomee.fr/?tQ0ssA
    bash function log
  • thumbnail
    GitHub - alibaba/weex: A framework for building Mobile cross-platform UI

    Utilise Vue.js

    9 février 2017 à 20:15:34 UTC+1 - permalink - archive.org - https://github.com/alibaba/weex
    js mobile native
  • thumbnail
    linux - How to expand/collapse a diff sections in Vimdiff? - Stack Overflow

    zo
    zc

    9 février 2017 à 10:30:53 UTC+1 - permalink - archive.org - http://stackoverflow.com/questions/5288875/how-to-expand-collapse-a-diff-sections-in-vimdiff
    vim vimdiff
  • Your first Progressive Web App on Rails - rossta.net

    apparemment ça va faire boom

    8 février 2017 à 12:04:10 UTC+1 - permalink - archive.org - https://rossta.net/blog/make-your-rails-app-a-progressive-web-app.html
    app pwa ruby
  • How do I measure request and response times at once using cURL? - Stack Overflow

    Create a new file, curl-format.txt, and paste in:

    time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n

    time_pretransfer: %{time_pretransfer}\n
    time_redirect: %{time_redirect}\n
    time_starttransfer: %{time_starttransfer}\n
    ----------\n
    time_total: %{time_total}\n

    Make a request:

    curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"

    8 février 2017 à 08:52:40 UTC+1 - permalink - archive.org - http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
    curl
  • How to install bash shell in Alpine Linux
    7 février 2017 à 20:15:13 UTC+1 - permalink - archive.org - https://www.cyberciti.biz/faq/alpine-linux-install-bash-using-apk-command/
    alpine ash bash
  • Note: Expected or not

    I don't know if this shit is expected (normal behaviour or not) but this is annoying

    bash :

    $ toto=tata
    $ echo $toto
    tata

    $ toto='tata'
    $ echo $toto
    tata

    $ toto="tata"
    $ echo $toto
    tata

    avec docker run -e

    $ docker run -e toto=tata -it debian:jessie bash
    root@5de64152ed05:/# echo $toto
    tata

    $ docker run -e toto='tata' -it debian:jessie bash
    root@99a6b62f595c:/# echo $toto
    tata

    $ docker run -e toto="tata" -it debian:jessie bash
    root@ab7581c30734:/# echo $toto
    tata

    avec docker run --env-file:

    $ cat env.file
    toto="tata"
    $ docker run -it --env-file env.file debian:jessie bash
    root@805480de4a52:/# echo $toto
    "tata"

    $ cat env.file
    toto='tata'
    $ docker run -it --env-file env.file debian:jessie bash
    root@004b88cc448d:/# echo $toto
    'tata'

    $ cat env.file
    toto=tata
    $ docker run -it --env-file env.file debian:jessie bash
    root@2ca9908d1cdf:/# echo $toto
    tata

    avec docker compose:

    $ cat docker-compose.yml
    version: '2'
    services:
    foo:
    image: debian:jessie
    container_name: foo
    environment:

    • toto1=tata
    • toto2="tata"
    • toto3='tata'
      command: tail -f /var/log/dmesg

    docker-compose up -d
    docker exec -it foo bash

    root@71a9a886cc24:/# echo $toto1
    tata
    root@71a9a886cc24:/# echo $toto2
    "tata"
    root@71a9a886cc24:/# echo $toto3
    'tata'

    2 février 2017 à 15:59:09 UTC+1 - permalink - archive.org - https://links.infomee.fr/?lXfuBg
    docker env value variable
  • Multicontainer Docker Configuration - AWS Elastic Beanstalk

    TIL

    Beanstalk is a little bit... magic. Dunno yet if its good or not :

    Elastic Beanstalk creates log volumes on the container instance, one for each container, at /var/log/containers/containername. These volumes are named awseb-logs-containername and should be mounted to the location within the container file structure where logs are written.

    For example, the following mount point maps the nginx log location in the container to the Elastic Beanstalk–generated volume for the nginx-proxy container.

    {
    "sourceVolume": "awseb-logs-nginx-proxy",
    "containerPath": "/var/log/nginx"
    }

    And all this logs can be copied into s3 automagically: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elasticbeanstalkhostmanager

    2 février 2017 à 15:22:37 UTC+1 - permalink - archive.org - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html#create_deploy_docker_v2config_dockerrun_format
    aws beanstalk log logs
  • Lenovo est de retour avec de nouveaux ThinkPad

    Via Doo

    20h d'autonomie annoncée pour celui là :
    Lenovo ThinkPad X270

    Le Lenovo ThinkPad X270 est conçu pour durer. Grâce à sa batterie, il pourra en effet tenir pas moins de 20 heures avec une seule charge. Son châssis a aussi été renforcé pour lui permettre de résister aux chocs.

    Plusieurs configurations seront proposées. L’écran de 12,5 pouces pourra aussi afficher du 720p ou du 1080p. Derrière, on pourra opter pour des Intel Core iX couplés à un maximum de 16 Go de RAM. Côté stockage, Lenovo proposera des disques à plateau (2 To max) ou du SSD (512 Go max). Il faudra cependant se contenter d’un GPU intégré.

    Le prix sera fixé à 949 $ pour le modèle de base.

    31 janvier 2017 à 12:51:13 UTC+1 - permalink - archive.org - http://www.fredzone.org/lenovo-est-de-retour-avec-de-nouveaux-thinkpad-003
    hardware
  • thumbnail
    Docker 1.13

    Sympa les petites nouveautés!

    docker system df
    docker system prune

    CLI restructured <3

    Improved CLI backwards compatibility <3

    30 janvier 2017 à 13:48:18 UTC+1 - permalink - archive.org - https://blog.docker.com/2017/01/whats-new-in-docker-1-13/
    docker
  • Note: memo cat eof

    cat <<'EOF' >> /tmp/bar
    foo
    EOF

    cat <<EOF >> /tmp/bar
    $foo
    EOF

    30 janvier 2017 à 13:47:12 UTC+1 * - permalink - archive.org - https://links.infomee.fr/?u4Pauw
    cat
Links per page: 20 50 100
◄Older
page 48 / 218
Newer►
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation