4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
◄Older
page 47 / 217
Newer►
  • Description détaillée d'Amazon Simple Queue Service (SQS) – Amazon Web Services (AWS)

    Cycle de vie des messages Amazon SQS

    Les messages stockés dans Amazon SQS ont un cycle de vie facile à gérer, mais qui garantit le traitement de tous les messages.

    Un système qui doit envoyer un message sélectionne une file d'attente Amazon SQS et utilise SendMessage pour lui envoyer un nouveau message.
    Un autre système traitant des messages doit traiter plus de messages : il appelle donc ReceiveMessage, et ce message est renvoyé.
    Dès lors qu'un message est renvoyé par ReceiveMessage, il ne sera pas renvoyé par une autre demande ReceiveMessage avant que le délai de visibilité ne soit expiré. Ainsi, plusieurs destinataires peuvent traiter le même message simultanément.
    Si le système de traitement des messages termine avec succès le traitement de ce message, il appelle DeleteMessage, ce qui supprime le message de la file d'attente pour que personne d'autre ne le traite. Si ce système ne réussit pas à traiter le message, il sera alors lu par un autre appel ReceiveMessage dès que le délai de visibilité sera expiré.
    Si vous avez associé une file d'attente de lettre morte à une file d'attente source, les messages seront déplacés vers la file d'attente de lettre morte lorsque le nombre de tentatives d'envoi que vous avez défini aura été atteint.
    March 2, 2017 at 9:12:54 PM GMT+1 - permalink - archive.org - https://aws.amazon.com/fr/sqs/details/
    amazon aws sqs
  • Tutorial: Todo-List Application — Bottle 0.12.13 documentation

    Running Bottle with a different server

    As said above, the standard server is perfectly suitable for development, personal use or a small group of people only using your application based on Bottle. For larger tasks, the standard server may become a bottleneck, as it is single-threaded, thus it can only serve one request at a time.

    But Bottle has already various adapters to multi-threaded servers on board, which perform better on higher load. Bottle supports Cherrypy, Fapws3, Flup and Paste.

    If you want to run for example Bottle with the Paste server, use the following code:

    from bottle import PasteServer
    ...
    run(server=PasteServer)

    This works exactly the same way with FlupServer, CherryPyServer and FapwsServer.

    March 2, 2017 at 9:09:38 PM GMT+1 - permalink - archive.org - https://bottlepy.org/docs/stable/tutorial_app.html#server-setup
    bottle python
  • thumbnail
    logging - How to log into a file for a python & bottle web server? - Stack Overflow

    import logging
    logging.basicConfig(filename='log.txt', format=logging.BASIC_FORMAT)
    logging.error('OH NO!')
    try:
    raise Exception('Foo')
    except:
    logging.exception("Oops:")

    March 2, 2017 at 8:56:16 PM GMT+1 - permalink - archive.org - http://stackoverflow.com/questions/15444695/how-to-log-into-a-file-for-a-python-bottle-web-server
    bottle log python
  • Note: docker bug

    Today I got a docker daemon not responding to commands (docker ps, docker run...)
    Even after restarting service
    In /var/log/docker I got this:
    time="2017-03-01T08:28:58.43946917Z" level=fatal msg="open /var/run/docker/libcontainerd/containerd/81623262351dfc42c5e87aa8df11592a57f2d14a468476620c7c4d6c89de1958/state.json: no such file or directory"

    The solution was to stop docker service, remove this /var/run/docker directory and restart docker service

    March 1, 2017 at 9:31:13 AM GMT+1 - permalink - archive.org - https://links.infomee.fr/?vywQIw
    bug docker
  • Scaling Based on Amazon SQS - Auto Scaling

    Beanstalk ne permet pas de définir un trigger basé sur le nombre d'éléments dans la queue SQS pour l'auto scaling des environements de type worker

    Pourtant c'est possible mais il y a un peu de boulot :

    • créer des scaling policies qui vont ajouter ou enlever des instances
    • créer des alarmes cloudwatch qui vont se déclencher par rapport au nb d'éléments dans la queue et appeler les scaling policies..

    http://docs.aws.amazon.com/autoscaling/latest/userguide/as-using-sqs-queue.html
    https://forums.aws.amazon.com/thread.jspa?messageID=722589

    On peut surement intégrer ça à beanstalk avec les .ebextensions (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html)

    En plus d'être un peu complexe et pas vraiment intégrer à beanstalk, ça n'a pas l'air très réactif, cet article en parle et donne une solution :
    Rapid Auto Scaling with Amazon SQS : https://aws.amazon.com/blogs/aws/auto-scaling-with-sqs/

    February 28, 2017 at 11:16:08 AM GMT+1 - permalink - archive.org - http://docs.aws.amazon.com/autoscaling/latest/userguide/as-using-sqs-queue.html
    auto aws beanstalk scaling sqs
  • Configure Connection Draining for Your Classic Load Balancer - Elastic Load Balancing
    February 24, 2017 at 11:57:55 AM GMT+1 - permalink - archive.org - https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html
    aws elb
  • Configure the Idle Connection Timeout for Your Classic Load Balancer - Elastic Load Balancing
    February 24, 2017 at 11:57:42 AM GMT+1 - permalink - archive.org - https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html
    aws elb
  • The git pickaxe

    Or "how to search text in git diff history"
    git log -p -S "string"

    February 23, 2017 at 10:40:45 AM GMT+1 * - permalink - archive.org - http://www.philandstuff.com/2014/02/09/git-pickaxe.html
    git log pickaxe search
  • Custom Platforms - AWS Elastic Beanstalk

    Depuis hier le 22 Février 2017

    seems cool and powerful

    February 23, 2017 at 10:04:35 AM GMT+1 * - permalink - archive.org - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platforms.html
    aws beanstalk
  • Note: How to know which policy contains a specific action?
    Warning : this loop does a lot of call to aws api, use it with caution

    To know that I needed to list all policies and associated statements (for the default policy version)

    ```
    #!/bin/bash
    IFS=$'\n'
    for line in $(aws iam list-policies|jq '.Policies|.[]|[ .PolicyName, .Arn, .DefaultVersionId ]| @csv' -r|sed 's/","/ /g'|sed 's/"//g'); do
        name=$(echo $line|cut -d' ' -f1);
        arn=$(echo $line|cut -d' ' -f2);
        version=$(echo $line|cut -d' ' -f3);
        echo "$name"
        aws iam get-policy-version --policy-arn $arn --version-id $version
    done
    ```

    Put this in a script, redirect output to a file and go get grep!
    February 22, 2017 at 4:16:06 PM GMT+1 * - permalink - archive.org - https://links.infomee.fr/?bERNcg
    aws bash for foreach iam policy separator
  • Configuring Application Version Lifecycle Settings - AWS Elastic Beanstalk

    Since December 22th 2016 you are able to configure application version lifecycle in Beanstalk.

    Very convenient, we can trash our custom api cleaning scripts :-)

    February 22, 2017 at 3:13:17 PM GMT+1 - permalink - archive.org - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-lifecycle.html
    aws beanstalk
  • General Options for All Environments - AWS Elastic Beanstalk

    Default listener (80) is enabled by default, to disable it :
    aws:elb:listener:
    ListenerEnabled: false

    February 20, 2017 at 4:44:59 PM GMT+1 - permalink - archive.org - http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-elblistener
    aws beanstalk
  • 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

    February 16, 2017 at 2:16:44 PM GMT+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/

    February 16, 2017 at 8:34:43 AM GMT+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"

    February 14, 2017 at 3:51:37 PM GMT+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

    February 14, 2017 at 3:45:21 PM GMT+1 - permalink - archive.org - https://links.infomee.fr/?3DXbeg
    delimiter sed
  • Amazon EBS Update – New Elastic Volumes Change Everything | AWS Blog

    aws <3

    February 14, 2017 at 1:33:04 PM GMT+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}

    February 13, 2017 at 12:27:23 PM GMT+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

    February 10, 2017 at 10:12:25 PM GMT+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

    February 10, 2017 at 4:27:52 PM GMT+1 - permalink - archive.org - https://hub.docker.com/_/buildpack-deps/
    debian docker ruby
Links per page: 20 50 100
◄Older
page 47 / 217
Newer►
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation