Skip to content

Instantly share code, notes, and snippets.

View jbialy's full-sized avatar
🤓

Janusz Bialy jbialy

🤓
View GitHub Profile
@jbialy
jbialy / gitundo.txt
Last active October 19, 2017 15:10
Undo pushed commits in git...
git revert <SHA>
git push
This is Git's safest, most basic "undo" scenario, because it doesn't alter history—so you can now git push the new "inverse" commit to undo your mistaken commit.
git reset <last good SHA> or git reset --hard <last good SHA>
git push -f
git reset rewinds your repository's history all the way back to the specified SHA. It's as if those commits never happened. By default, git reset preserves the working directory. The commits are gone, but the contents are still on disk. This is the safest option, but often, you'll want to "undo" the commits and the changes in one move—that's what --hard does
@jbialy
jbialy / keybase.md
Created May 14, 2018 17:10
Keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jbialy
jbialy / minikube_rbac_psp.md
Last active October 8, 2018 17:17
Minikube with RBAC and PSP enabled

RBAC is enable by default

Start minikube with RBAC on OSX:

$ minikube start --bootstrapper=kubeadm

In order to enable PSP:

@jbialy
jbialy / kubernetes-helm.md
Created March 7, 2019 21:38
Installing an older version of a brew formula

This example uses kubernetes-helm as the forumla being installed.

Checkout the homebrew-core repo:

git clone git@github.com:Homebrew/homebrew-core.git && cd homebrew-core

Find the commit hash related to the formula version that you wish to install:

git log master -- Formula/kubernetes-helm.rb

@jbialy
jbialy / gist:7d549008b61ee1ed5d42fd7531dd4071
Created May 2, 2019 20:17
Signal Sciences Agent 3.22.0 (alpine 3.9.3)
k logs cqd-infra-nginx-ingress-controller-67764dbb55-f7b6j sigsci-agent
2019/05/02 20:13:54.847707 Signal Sciences Agent 3.22.0 starting as user 63101 with PID 1, Max open files=1048576, Max data size=unlimited, Max address space=unlimited, Max stack size=8388608
2019/05/02 20:13:54.851494 =====================================================
2019/05/02 20:13:54.851504 Agent: cqd-infra-nginx-ingress-controller-67764dbb55-f7b6j
2019/05/02 20:13:54.851507 System: alpine 3.9.3 (linux 4.9.0-7-amd64)
2019/05/02 20:13:54.851509 VM: xen
2019/05/02 20:13:54.851516 Memory: 3.246G / 3.862G RAM available
2019/05/02 20:13:54.851520 CPU: 2 MaxProcs / 2 CPU cores available
2019/05/02 20:13:54.851522 =====================================================
2019/05/02 20:14:00.108541 Config update failed try 1: unable to update config: failed to download using primary and failover urls: unable to process request: Get https://sigsci-agent-wafconf.s3.amazonaws.com/3/8a37921d-01e8-4b2d-bc10-b8c6656c7605.conf: x50
@jbialy
jbialy / gist:e2569bba94a3207043aa81af2241aeaa
Created May 2, 2019 20:57
k describe pod cqd-infra-nginx-ingress-controller-67764dbb55-84kmj
Containers:
nginx-ingress-controller:
Container ID: docker://a0fd0c22bcf55a5f023e09bd44c65208cf7347745f294136fc987a3ce904645f
Image: qliktech-docker.jfrog.io/nginx-ingress-controller:1.1.0
Image ID: docker-pullable://qliktech-docker.jfrog.io/nginx-ingress-controller@sha256:cd58eba4d0eba00ecb2c8ba07abcff552e8de7cfa10433304a22138b99ff4cef
Ports: 80/TCP, 443/TCP, 18080/TCP, 10254/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP
Args:
/nginx-ingress-controller
--default-backend-service=
#!/usr/bin/env python3
"""Wrapper tool for writing aws credentials into profiles."""
import argparse
import configparser
import platform
import subprocess
from os import path
from shutil import which
parser = argparse.ArgumentParser(description='Wrapper script for aws-okta tool.')
@jbialy
jbialy / gpg-ssh-setup.md
Created April 3, 2023 17:21 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@jbialy
jbialy / public-ed25519.pgp
Last active April 13, 2023 13:58
PGP Public Key (ed25519)
-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEZDbwHRYJKwYBBAHaRw8BAQdAHn2Jzq8H8NzLFyenMICyM21I2eVbsSdktcqm
kga82yy0H0phbnVzeiBCaWFseSA8amJpYWx5QGdtYWlsLmNvbT6IkwQTFgoAOxYh
BCTtN5QMdhV2sjFWf9zM4iI1RPfnBQJkNvAdAhsDBQsJCAcCAiICBhUKCQgLAgQW
AgMBAh4HAheAAAoJENzM4iI1RPfnErUA/2MGgLUC2OIhMl7btWObh4bu5rm254MF
rBlFkpMhFRcCAP0U006mcGBNtrdUI+2TjTcn73PnJSZoMrKyKUJq936cCbQiSmFu
dXN6IEJpYWx5IDxqYW51c3pAY2lyY2xlY2kuY29tPoiTBBMWCgA7FiEEJO03lAx2
FXayMVZ/3MziIjVE9+cFAmQ29FYCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcC
F4AACgkQ3MziIjVE9+cKEAD9FkWM4ZQOdYWmcHf8+qcZF9b41XpFMSztJSGUFvzh
@jbialy
jbialy / public.pgp
Last active April 13, 2023 13:58
PGP Public Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFrLyJkBCACwY0xdnFBb7b5lUGdoUgy3D2RyPB2SMRXvZL7TmhL4utK8LFaS
NpSefarvdvYYdZv8K8aqWJP8TIFoWG9Ua/ye1NnvT1pmUn+9ddv9i82zU4JUDx1O
C49UT9JsMVqS1KQuPGWckX7EUfUg3yP1P6rcs/9niZNPgmXgyOfJONdo/U0p6HLn
753+6+MkMM1H+pKcaYgQb+nyMycOsjFAM21ZQPGlM0j6ax2S30xRjBeLzif9Ye6r
sBqjN1Bwf0B1hRSr2XLiKVQdgq4ZEZJHlDcycZUinhC/jmJbSOtUxOp9/09hHAk4
G9QCvyfy55PeTJnxnhEfpx5INnr4QPuLPZt1ABEBAAG0H0phbnVzeiBCaWFseSA8
amJpYWx5QGdtYWlsLmNvbT6JAVEEEwEIADsCGwMFCwkIBwIGFQoJCAsCBBYCAwEC
HgECF4AWIQSf1jDeUVqhc53lXuyMw592bXsRQwUCYmhPHgIZAQAKCRCMw592bXsR