This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sLo - https://gist.github.com/diafour/ede2238e6d7fbec9e5dff527f1b71788/raw/75e1aa6ef98f9ab8e83b866a6837047ff8293dfe/debug-report-module.sh | bash -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A helper for kind to create and delete clusters with untrusted local registry. | |
# Based on https://kind.sigs.k8s.io/docs/user/local-registry/ | |
# | |
# Note: kind 0.17.0 | |
set -Eeo pipefail | |
# Settings for kind cluster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cur = self.conn.cursor() | |
cur.execute( | |
""" | |
SELECT | |
user_id | |
FROM | |
user_state | |
""" | |
) | |
user_ids = cur.fetchall() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"fmt" | |
"runtime" | |
"testing" | |
"github.com/sirupsen/logrus" | |
) | |
type MyFormatter struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try (tonumber) catch ("Should catch error") | |
"a20" | |
"Should catch error" | |
# Tests are groups of three lines: program, input, expected output | |
# Blank lines and lines starting with # are ignored | |
# | |
# Simple value tests to check parser. Input is irrelevant | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A helper for kind to create and delete clusters with untrusted local registry. | |
# Based on https://kind.sigs.k8s.io/docs/user/local-registry/ | |
# | |
# Note: kind 0.10.0 | |
# Settings for kind cluster | |
CLUSTER_NAME="kube-19" | |
KIND_NODE_IMAGE="kindest/node:v1.19.7" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { var countM = 0; var countRows = $("table.catalog-item-list tr").each(function() { var t = $(this).find("td.catalog-item-nal div.catalog-item-nal-yes span b").text(); if (t == 'М') { $(this).css('background-color','pink'); countM++; } ; if (t!='М') {$(this).css('visibility', 'collapse')} } ).length; return {'M':countM, 'All':countRows}; })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --shortstat --pretty="%cE" | sed 's/\(.*\)@.*/\1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/\1 0 insertions\(+\), \2/;s/\(\+\)$/\(\+\), 0 deletions\(-\)/;s/insertions?\(\+\), //;s/ deletions?\(-\)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --all --graph --date="format:%d.%m.%Y %H:%M" --pretty="%C(auto,yellow)%h %C(green)%an <%ae> %Cblue%ad %C(auto)%d %C(reset)%s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://github.com/CommercialTribe/kube-redis/blob/develop/sidecar.sh | |
KUBE_TOKEN=$(</var/run/secrets/kubernetes.io/serviceaccount/token) | |
KUBE_CA=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt | |
KUBE_NS=$(</var/run/secrets/kubernetes.io/serviceaccount/namespace) | |
KUBE_URL="https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT_HTTPS" |
NewerOlder