Skip to content

Instantly share code, notes, and snippets.

@flou
flou / installed-extensions
Last active March 9, 2018 10:15
Visual Studio Code settings
vscode-docker
vscode-paste-and-indent
project-manager
one-monokai
python
gitlens
vscode-elixir
vscode.sublime-keybindings
vscode-subword-navigation
advanced-new-file
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"binary_file_patterns":
[
"*.psd",
"*.png",
"*.jpg",
"*.gif"
],
package main
import (
"fmt"
"strings"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ecs"
)
"""
List unhealthy services in your ECS clusters
The script will list the clusters and fetch details about services that are
running in it.
Then it determines if the service is healthy or not:
* the service status must be ACTIVE
* the service must have a non-empty events list
* the service desiredCount equals its runningCount
* the last event message of the service ends with 'has reached a steady state.'

Keybase proof

I hereby claim:

  • I am flou on github.
  • I am flou (https://keybase.io/flou) on keybase.
  • I have a public key ASD9u63WEV6oHxIdBDmedtlgI8AxKq1NDf8Mu7ros-NnRAo

To claim this, I am signing this object:

from __future__ import print_function
import sys
import boto3
import logging
from botocore.exceptions import ParamValidationError
ecr = boto3.client('ecr')
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
import glob
import json
import os
def find_nodes(node, key, debug=False):
if isinstance(node, unicode) or isinstance(node, list):
return
settings =
lang: 'fr'
# Locale Strings
locale =
en:
weekdays: [
'Sunday'
'Monday'
'Tuesday'
#!/bin/sh
# requires imgcat (https://github.com/gnachman/iTerm2/blob/master/tests/imgcat)
xkcd_issue=$1
TMP_FILE=$(mktemp /tmp/xkcd-$xkcd_issue.json.XXXXXXXX)
curl -s http://xkcd.com/$xkcd_issue/info.0.json > $TMP_FILE
imgurl=$(jq '.img' $TMP_FILE | tr -d \")
imgtitle=$(jq '.title' $TMP_FILE | tr -d \")
imgalt=$(jq '.alt' $TMP_FILE | tr -d \")
@flou
flou / learncrystal.cr
Last active August 29, 2015 14:27
Learn Crystal in Y minutes
# Comments start with a hash
# First and foremost: Everything is an object.
# Numbers are objects
3.class # => Int32
3.to_s # => "3"