Skip to content

Instantly share code, notes, and snippets.


Piotr Roszatycki dex4er

View GitHub Profile
## The fake API service for OpenVPN that allows to use client with simple setup mode.
use Mojo::File;
use Mojo::Util 'xml_escape';
use Mojolicious::Lite;
post '/RPC2' => sub {
my ($c) = @_;
View prometheus-operator-productional-values.yaml
## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
# imageRegistry: myRegistryName
# imagePullSecrets:
# - myRegistryKeySecretName
# storageClass: myStorageClass
labels: {}
kubectl get pod -o wide | perl -pe 's/\b (?! )\b/_/g' | q -H 'select node, count(*) from - group by node'
dex4er / .bash_aliases
Created Jun 16, 2020
Bash aliases for kubectl
View .bash_aliases
alias k='kubectl'
alias kd='kubectl describe'
alias kdd='kubectl describe deployment'
alias kddn='kubectl describe deployment --namespace'
alias kdp='kubectl describe pod'
alias kdpn='kubectl describe pod --namespace'
alias kds='kubectl describe secret'
alias kdsn='kubectl describe secret --namespace'
alias kdsv='kubectl describe service'
alias kdsva='kubectl describe service --all-namespaces'
dex4er /
Last active Jun 9, 2021
Terraform less verbose and more bash friendly
trap 'rm -rf terraform.tfplan' EXIT
trap '' INT
function filter_manifest_short() {
grep --line-buffered -v -P '\(known after apply\)|\(\d+ unchanged \w+ hidden\)'
function filter_manifest_compact() {
dex4er / docker-compose.yml
Created Nov 12, 2019
Example of docker compose
View docker-compose.yml
# Docker services for development environment
# Usage: docker-compose up -d --remove-orphans
version: "3"
container_name: influxdb
image: influxdb:1.7

polish-vehicle-registration-certificate-decoder demo with Parcel


Install with Node.js:

npm install
View make-ts-from-graphql.ts
#!/usr/bin/env ts-node
/// <reference types="node" />
import glob from 'fast-glob'
import fs from 'fs'
import path from 'path'
import yargs from 'yargs'
const defaultPatterns = ['**/*.graphql', '**/*.gql', '!node_modules']
dex4er /
Last active Apr 17, 2019
from graphene_django.views import GraphQLView
from django.conf import settings
from django.utils.decorators import classonlymethod
from django.views.decorators.csrf import csrf_protect, csrf_exempt
class NoCsrfForJSONGraphQLView(GraphQLView):
def as_view(cls, **kwargs):
View schoolPerson.js
class Teacher {
class Director {
class Student {
constructor(name) { = name;
function greeting(stranger) {