Skip to content

Instantly share code, notes, and snippets.

Jakub Román jakub-roman

Block or report user

Report or block jakub-roman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View python-redis
#!/usr/bin/env python
import redis
import time
import random, string
from os import getenv
r_host = getenv('HOST', 'localhost')
r_port = getenv('PORT', '6379')
r = redis.StrictRedis(host=r_host, port=r_port)
View express.js
var express = require('express')
var app = express()
var pug = require('pug')
var fs = require('fs')
var bp = require('body-parser')
const config = './config.json'
const timeout = 300 // 5mins
app.use(bp.urlencoded({ extended: false }))
View build_query.js
const format = require('pg-format')
var filter = [
{
c: "id",
o: "=",
v: "1"
},
{
c: "name",
View perl-redis
#!/usr/bin/env perl
use strict;
use warnings;
use Redis;
use Data::Dumper;
use Time::HiRes qw/time/;
my $r = Redis->new();
my $num = 10000;
View Check TI connection to 118.97.213.210
#!/bin/bash -x
#
# 1. run as `$0 get-nodes a`
# 2. pick one node and `kubectl describe node ...`
# 3. pick a pod and run `$0 connection <namespace> <pod_name>`
case $1 in
get-nodes)
# second param is AV zone = a/b/c
kubectl get node -l failure-domain.beta.kubernetes.io/zone=ap-southeast-1${2},nodetype=interactive
View remove_authenticated_user.py
#!/usr/bin/env python
import sys
import boto3
import time
import re
import json
backup_time = time.strftime('%Y%m%d%M%H%S')
backup_bucket = 'iflix-backup-acl'
View buckets.py
#!/usr/bin/env python
import sys
import boto3
import random
from colorama import Fore, init
init()
s3 = boto3.client('s3')
View addons_output.md

with following config.yaml:

addons:
- helm/kube-system/iflix-namespaces-limits: ["all"]
  kustomize/kube-system/kubernetes-cluster-controller: ["ops"]
- helm/kube-system/kubernetes-github-authn: ["staging"]
  kustomize/kube-system/aws-secret-operator: ["green", "ops"]
  helm/kube-system/traefik: ["prod"]
  helm/kube-system/traefik-int: ["prod","staging","ops"]
You can’t perform that action at this time.