SERVICE_DEPLOYMENT_FAILED
The service deployment has failed. This event is sent for services with deployment circuit breaker logic turned on.
find . -name foo.yml -exec bash -c "grep -q office {} && echo {} && grep office {}" \;
terraform workspace select old-name
terraform state pull >old-name.tfstate
terraform workspace new new-name
terraform state push old-name.tfstate
terraform show just to confirm that the newly-imported state looks "right", before we delete the old workspace
terraform workspace delete -force old-name
Pour prendre des décisions importantes
Server Side apply VS Client Side apply
via Edwin
Un Operator qui :
Du coup on peut créer des resources AWS avec kube (on peut se passer de terraform, on peut utiliser une CI/CD adaptée à déployer dans Kube)
virtualenv venv
. venv/bin/activate
pip install --editable .
Navigate through your search history (/) or command history (:) without leaving your home row?
q:
q/
Think "query search" and "query command"
asdf is a tool version manager. All tool version definitions are contained within one file (.tool-versions) which you can check in to your project's Git repository to share with your team, ensuring everyone is using the exact same versions of tools.
brew install pinentry-mac
If not existing already create the file ~/.gnupg/gpg-agent.conf and add the following line:
pinentry-program /usr/local/bin/pinentry-mac
gpgconf --kill gpg-agent
"Create Amazon MemoryDB Cluster Instances#
You can create Amazon MemoryDB Clusters using the Cluster custom resource"
They really name their CRD "Cluster" ?? :facepalm:
Don't Repeat Yourself (DRY) : https://fr.wikipedia.org/wiki/Ne_vous_r%C3%A9p%C3%A9tez_pas
Keep It Simple, Stupid (KISS) : https://fr.wikipedia.org/wiki/Principe_KISS
You aren't gonna need it (YAGNI) : https://fr.wikipedia.org/wiki/YAGNI
Boy Scout Rule : https://97-things-every-x-should-know.gitbooks.io/97-things-every-programmer-should-know/content/en/thing_08/
Single Responsibility Principle (SRP) : https://en.wikipedia.org/wiki/Single-responsibility_principle
Dependency inversion principle (DIP) : https://en.wikipedia.org/wiki/Dependency_inversion_principle
4 règles du design simple : https://martinfowler.com/bliki/BeckDesignRules.html
Query Command Separation : https://martinfowler.com/bliki/CommandQuerySeparation.html
Design Pattern : https://refactoring.guru/design-patterns
Clean/Hexagonal/Onion architecture : https://blog.octo.com/application-domain-infrastructure-des-mots-de-la-layered-hexagonal-clean-architecture/
le genre de puzzlegame bien sympa (et prise de tete :D)
via sebsauvage
Practical vim tips and trick for all level
Aws documentation index, and for each product doc you can get a RSS feed
Datadog agent changelog : https://github.com/DataDog/datadog-agent/blob/main/CHANGELOG.rst
Datadog helm chart changelog : https://github.com/DataDog/helm-charts/blob/main/charts/datadog/CHANGELOG.md
Datadog helm chart readme : https://github.com/DataDog/helm-charts/tree/main/charts/datadog
FIrst edit your A chart to not include the resource, and add the keep annontation
https://helm.sh/docs/howto/charts_tips_and_tricks/#tell-helm-not-to-uninstall-a-resource
annotations:
"helm.sh/resource-policy": keep
From this point, your resource is not managed by helm anymore
Clean the resource (annotations...)
Then import the resource so it's managed by B chart
https://jacky-jiang.medium.com/import-existing-resources-in-helm-3-e27db11fd467
It's worth to think about your rollup/aggregation strategy
For metrics-like errors, its better to show the worst case scenario with max/max
https://medium.com/omio-engineering/cpu-limits-and-aggressive-throttling-in-kubernetes-c5b20bd8a718
https://blog.turbonomic.com/kubernetes-cpu-throttling-the-silent-killer-of-response-time-and-what-to-do-about-it
https://erickhun.com/posts/kubernetes-faster-services-no-cpu-limits/
https://engineering.indeedblog.com/blog/2019/12/unthrottled-fixing-cpu-limits-in-the-cloud/
https://www.youtube.com/watch?v=UE7QX98-kO0
You want to really understand decorators? Watch this video!
boilerplate:
import functools
def decorator(func):
@functools.wraps(func)
def wrapper_decorator(*args, **kwargs):
# Do something before
value = func(*args, **kwargs)
# Do something after
return value
return wrapper_decorator
Si j'avais le temps, ca me plairait bien !
When you want to publish a beta version, you can use a special tag that won't be proposed to client using pip install package --upgrade
example :
current version = 3.0.1
next version = 3.1.0
I can tag with 3.1.0-alpha.1
pip install --upgrade won't upgrade to this version but pip install package==3.1.0-alpha.1 will
def bubbleSort(arr):
n = len(arr)
# Traverse through all array elements
for i in range(n):
# Last i elements are already in place
for j in range(0, n-i-1):
# traverse the array from 0 to n-i-1
# Swap if the element found is greater
# than the next element
if arr[j] > arr[j+1] :
arr[j], arr[j+1] = arr[j+1], arr[j
bindkey -M emacs |grep edit-command
"^X^E" edit-command-line
ctrl x ctrl e pour editer la commande actuelle via vim
Je viens de découvrir pocketTube et j'ai hate de tester ça. Il y a une extension Firefox et meme un app Android.
L'idée c'est de pouvoir grouper les channels Youtube par thématique mais aussi et surtout voir toutes les vidéos par date de parution et ne pas en louper car elles sont zappées par l'algo de Youtube (qui est utilisé dans la partie "Mes abonnements")
foreach list of objects
[{
name = "xxx"
description = "xxx"
param = "xxx"
},
...
]
for_each = {
for item in var.items:
item.name => item
}
name = each.key OU each.value.name
description = each.value.description
Ne pas oublier que le web a été pensé pour être décentralisé dès le départ : chacun peut posséder ses données, les héberger à la maison, publier son site depuis le raspberry du salon etc..
Via sebsauvage
Note à moi même : il faut faire attention aux headers qu'on forward à l'origine dans ce cas précis car ça peut poser des problemes d'authent' entre cloudfront et le bucket s3
django template does not like defaultdict, 2 solutions:
1) set default_factory to None
or
2) cast defaultdict to a simpledict
"The template variable resolution algorithm in Django will attempt to resolve new_data.items as new_data['items'] first, which resolves to an empty list when using defaultdict(list)."
J'adore le concept, recréer des locaux virtuels où on peut aller tape sur l'épaule d'un collègue, se réunir dans une salle de réunion, devant un tableau blanc.. excellent !
:echo @% def/my.txt directory/name of file (relative to the current working directory of /abc)
:echo expand('%:t') my.txt name of file ('tail')
:echo expand('%:p') /abc/def/my.txt full path
:echo expand('%:p:h') /abc/def directory containing file ('head')
:echo expand('%:p:h:t') def First get the full path with :p (/abc/def/my.txt), then get the head of that with :h (/abc/def), then get the tail of that with :t (def)
:echo expand('%:r') def/my name of file less one extension ('root')
:echo expand('%:e') txt name of file's extension ('extension')
service check : pour envoyer un status (0,1,2) et un message à la mode Nagios
https://docs.datadoghq.com/developers/service_checks/