Data Dumps:
- https://github.com/cornernote/gseries-tools/tree/master/g815/info
- https://github.com/cornernote/g815-wireshark
Resources:
sub cloud_moomin { | |
set resp.http.moomin00 = " %1b[38;5;237m▄%1b[38;5;235m▄%1b[49m"; | |
set resp.http.moomin01 = " %1b[38;5;237m▄%1b[48;5;237m%1b[38;5;249m▄%1b[38;5;236m▄%1b[49m %1b[48;5;239m%1b[38;5;16m▄%1b[48;5;237m%1b[38;5;253m▄%1b[38;5;247m▄%1b[48;5;234m%1b[38;5;16m▄%1b[49m"; | |
set resp.http.moomin02 = " %1b[38;5;233m▄%1b[48;5;253m%1b[38;5;237m▄%1b[48;5;254m%1b[38;5;255m▄%1b[38;5;251m▄%1b[38;5;239m%1b[49m▄ %1b[38;5;237m▄ %1b[48;5;254m%1b[38;5;248m▄%1b[48;5;249m%1b[38;5;254m▄%1b[48;5;235m%1b[38;5;246m▄%1b[49m"; | |
set resp.http.moomin03 = " %1b[38;5;235m▄%1b[48;5;250m%1b[38;5;242m▄%1b[48;5;231m %1b[48;5;247m%1b[38;5;231m▄%1b[48;5;252m▄%1b[48;5;253m▄%1b[48;5;254m▄%1b[48;5;253m▄%1b[48;5;249m▄%1b[48;5;188m▄%1b[48;5;245m%1b[38;5;251m▄%1b[49m"; | |
set resp.http.moomin04 = " |
groups: | |
- name: datetime | |
rules: | |
- record: daily_saving_time_belgium | |
expr: | | |
(vector(0) and (month() < 3 or month() > 10)) | |
or | |
(vector(1) and (month() > 3 and month() < 10)) | |
or | |
( |
#!/bin/sh | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff state from all namespaces | |
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
# this is an alternate compact function implementation which also removes keys with empty string values | |
# writing the tests for this is left as an excercise to the reader :D | |
def compact(h) | |
h.inject({}) do |result, (k, v)| | |
if v.is_a?(Hash) | |
result[k] = compact(v) | |
elsif v.is_a?(String) | |
result[k] = v unless v.empty? | |
elsif !v.nil? |
Both command line utilities allow to JSON output from a shell.
Django channels are official way for implementing async messaging in Django.
The primary caveat when working with GraphQL subscription is that we can't serialize message before broadcasting it to Group of subscribers. Each subscriber might use different GraphQL query so we don't know how to serialize instance in advance.
See related issue
#!/bin/bash | |
AWS_REGION="--region XXX_REGION" | |
AWS_PROFILE="--profile XXX_PROFILE" | |
LOG_GROUP="XXX_YOUR_LOG_GROUP" | |
LOG_STREAM="$(whoami)-$( date "+%Y%m%d-%H-%M-%S")" | |
aws logs create-log-stream --log-group-name $LOG_GROUP --log-stream-name $LOG_STREAM $AWS_REGION $AWS_PROFILE |
kubectl get pod -o jsonpath='{.items[?(@.status.phase!="Running")].metadata.name}' |
kubectl get pod -o jsonpath='{.items[?(@.status.phase!="Running")].metadata.name}' |