Skip to content

Instantly share code, notes, and snippets.

View tankakatan's full-sized avatar
🐾
n̠̻͇e͎̻̪o͚̝͚d͔̠e̼͓͖q̺͙u͚̝̪a̫͔̙t̘͚̠e̪̙͍

Den Voropaev tankakatan

🐾
n̠̻͇e͎̻̪o͚̝͚d͔̠e̼͓͖q̺͙u͚̝̪a̫͔̙t̘͚̠e̪̙͍
View GitHub Profile
@tankakatan
tankakatan / template.sh
Created March 19, 2024 12:08
Bash script template
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@tankakatan
tankakatan / browser-uploader.js
Created August 31, 2022 12:49
Multipart/form-data upload test
/* eslint-disable no-console */
(() => {
/**
* Usage:
* • Run Point Engine
* • Open Point Browser or a browser configured to use HTTPS proxy at localhost:8666
* • Load https://point
* • Open browser console
* • Copy and paste the contents of this file into the console prompt and hit enter
* • The web page contents will be replaced with the HTML generated below
const pino = require('pino');
const log = pino({level: 'trace', prettyPrint: {colorize: true}}).child({foo: 'bar'});
// 1. plain error object
// please note that in the second log, no stack is printed
const e = new Error('Test error');
log.error(e, 'A test error #1');
// [1658228394571] ERROR (22201 on MacBook-Pro-Denis.local): A test error #1
// Error: Test error
// at Object.<anonymous> (/Users/denisvoropaev/Developer/pointnetwork/pointnetwork/_local/custom-error-example.js:6:11)
@tankakatan
tankakatan / api.yaml
Last active January 6, 2022 10:20
Test API endpoint
openapi: 3.0.0
info:
version: 1.0.0
title: Twitter
description: Twitter-like API
servers:
- url: https://twitter.z/v1
paths:
@tankakatan
tankakatan / Dockerfile.sops
Created April 7, 2020 15:50
A standalone lightweight (potentially) platform-agnostic SOPS script that enables convenient GnuPG encryption / decryption of file contents
FROM alpine:3.7
ARG version
ENV url "https://github.com/mozilla/sops/releases/download/${version}/sops-${version}.linux"
RUN apk update && apk add --no-cache ca-certificates gnupg
RUN wget "${url}" -O /usr/local/bin/sops
RUN chmod 0755 /usr/local/bin/sops
RUN chown root:root /usr/local/bin/sops
@tankakatan
tankakatan / Dockerfile.tanka
Last active April 10, 2020 08:43
An example of how to build grafana tanka image and use it as a standalone out of the box tanka cli convenient for CI automation.
# https://stackoverflow.com/questions/56645546/from-as-in-dockerfile-not-working-as-i-expect
# Installing jsonnet-bundler
FROM golang:alpine AS go_jb
RUN apk --no-cache add git
RUN go get -u github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb
# Installing docker & kubectl
@tankakatan
tankakatan / test.cookies.js
Last active November 14, 2019 21:12
Puppeteer Page.prototype.cookies method test
"use strict";
const puppeteer = require ('puppeteer')
const { expect } = require ('chai')
describe ('Page.prototype.setCookies', () => {
let browser = undefined
let page = undefined
@tankakatan
tankakatan / test.set.cookie.js
Created September 1, 2019 15:11
Puppeteer setCookie test
@tankakatan
tankakatan / keybase.md
Created May 21, 2018 17:49
keybase.md

Keybase proof

I hereby claim:

  • I am tankakatan on github.
  • I am tankakatan (https://keybase.io/tankakatan) on keybase.
  • I have a public key ASCsu85ZKqd0Y7aGnCY032EH9JIJbMQAUW2hEtQbinSiCwo

To claim this, I am signing this object: