Skip to content

Instantly share code, notes, and snippets.

View pawndev's full-sized avatar
:octocat:
Trying to quit vim

Coquelet Christophe pawndev

:octocat:
Trying to quit vim
View GitHub Profile
@pawndev
pawndev / catch-trace.js
Created January 3, 2020 13:48
Log on catch in JavaScript/TypeScript
console.log("error object:");
console.log(err);
console.log();
console.log("error object toString():");
console.log("\t" + err.toString());
console.log();
console.log("error object attributes: ");
console.log('\tname: ' + err.name + ' message: ' + err.message + ' at: ' + err.at + ' text: ' + err.text);
#!/usr/bin/env python
import argparse
import collections
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--debug', type=int, help='')
parser.add_argument('--input', type=str, default='info.log', help='input log file')
args = parser.parse_args()
#!/bin/sh
if [ -d /opt/rke/etc/kubernetes ];
then
K8S_DIR="/opt/rke/etc/kubernetes"
else
K8S_DIR="/etc/kubernetes"
fi
for cert in `find "${K8S_DIR}/ssl" -type f -name *.pem | grep -v "\-key\.pem$" | grep -v kube-admin | sort`; do
md5sum $cert
#!/bin/bash
#########################################################################
# Copyright (C) 2019-2020 Akito <the@akito.ooo> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome6",
"definitions": {
"YamlAssertBase": {
"type": "object",
"additionalProperties": false,
"properties": {
"tests": {
"type": "array",