Skip to content

Instantly share code, notes, and snippets.

View jkremser's full-sized avatar
💭
🇺🇦 ❤️

Jirka Kremser jkremser

💭
🇺🇦 ❤️
View GitHub Profile

Running Kubernetes 1.24 with CAPVCD.

❗ This is tested with Vanilla Kubernetes nodes, it may not work with Tanzu.

Image-builder

  • Clone the image-builder repo.
  • Edit images/capi/ansible/node.yml
  • Add the following tasks at the end (e.g. before the sysprep section)
@kuritka
kuritka / commit-msg.MD
Last active February 1, 2022 16:22
commit-msg preventing commit having sensitive information in commit message

preventing commit having sensitive information in commit message

Sometimes it happens that people accidentally push information from inside the organization to the public github repository. It could be hostname, ip address, proxy etc... This information could be somewhere in commit mesage and if reviewers see it, it's too late.

For this reason, I created a GitHook protection (short snippet running locally in your project) that warns you if it finds vulnerable information before you commit.

See the vulnerable commit message

Vulnerable commit
@jkremser
jkremser / darkify_slack.sh
Last active March 27, 2019 16:52
dark slack
#! /bin/bash
#since slack 2.6.3 there is some hack in that file, so make sure this piece of code goes before the:
#start(assignIn({}, require('electron').remote.getGlobal('loadSettings'), { windowType: 'WEBAPP' }));
#..line
# since 3.0.5
# or before the 'const loadSettings = ...' line
cat << 'EOF' >> /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active July 2, 2024 14:45
Vanilla JavaScript Quick Reference / Cheatsheet
@jkremser
jkremser / gist:119ac1ad8181abbd4ec1
Last active August 29, 2015 14:18
inventory REST api
# this is no longer valid because of the AuthN
create tenant
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "acme"}' http://127.0.0.1:8080/hawkular/inventory/tenants
create environment
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "prod"}' http://127.0.0.1:8080/hawkular/inventory/acme/environments
create resource type
curl -ivX POST -H "Content-Type: application/json" -d '{"id": "URL", "version": "1.0"}' http://127.0.0.1:8080/hawkular/inventory/acme/resourceTypes
@niun
niun / find-raspberry.sh
Last active June 27, 2024 14:00
Find Raspberry Pi in network (looking for MAC address vendor prefix of Raspberry Pi Foundation using nmap, awk for ipv4 / ping6, ip, grep for ipv6 neighbour discovery)
sudo nmap -sP 192.168.0.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@apk
apk / websock.sh
Created April 18, 2012 15:51
A web socket server as a bash script.
#!/bin/bash
# WebSocket shell, start & browse to http://<Host>:6655/
# Requires bash 4.x, openssl.
# Author: rootshell@corelogics.de (which isn't me, apk)
coproc d { nc -l -p 6656 -q 0; }
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE
HTTP/1.1 200 OK
<html><head><script language="javascript">
var url = location.hostname + ':' + (parseInt(location.port) + 1);
@derEremit
derEremit / gource-multiple-repositories.sh
Created November 8, 2011 14:58 — forked from anonymous/gource-multiple-repositories.sh
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
RESOLUTION="1600x1080"
outfile="gource.mp4"
i=0