Skip to content

Instantly share code, notes, and snippets.

View dzintars's full-sized avatar
🇱🇻
Playing with Zuul CI

Dzintars dzintars

🇱🇻
Playing with Zuul CI
View GitHub Profile
@dzintars
dzintars / install-protoc-compiler.sh
Last active January 4, 2022 17:19
Install protoc-gen-go
#!/bin/sh
# Author: Dzintars Klavins
# This script will install Protoc compiler
# Don't forget to make this file executable
###################################
# Protocol Buffers installation #
###################################
@dzintars
dzintars / github.sh
Last active September 2, 2020 16:37
#!/bin/sh
# Author: Dzintars Klavins
# This script will setup GitHub with multiple SSH identities
# Don't forget to make this file executable
# Setup multiple SSH identities for different Git accounts (with different credentials)
# Empty content of file
> ~/.config/Code/User/settings.json
# Place configuration in file.
#!/bin/bash
# Author: Dzintars Klavins
# This script will delete all network connections and devices.
# WARNING!!! Network connection will be lost!
# Delete all existing connections.
# All credits to: https://www.rene-pickhardt.de/index.html%3Fp=1955.html
for i in `nmcli c | \
grep -o -- "[0-9a-fA-F]\{8\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{12\}"` ; \
apiVersion: v1
kind: Pod
metadata:
name: jenkins
labels:
app: jenkins
spec:
restartPolicy: Always
containers:
- name: jenkins-server

FZF

Move up/down in results - ctrl+j and ctrl+k

Open file in vertical split - ctrl+v

Open file in horizontal split - ctrl+x

Open file in new tab - ctrl+t

@dzintars
dzintars / Bazel-Typescript.md
Last active December 4, 2021 05:22
Personal notes on Bazel Typescript setups

Bazel Typescript

To avoid ../../../../../../filename.ts garbage in the source code you can use Typescript Path Aliases. This approach not only cleans up your imports but also helps when making refacoring and moving packages/modules around. No matter where you will place your package, all imports allways will be resolvable.

But this is not enought at runtime. For example if you want to run WebPack dev-server. By default webpack does not know how to resolve those imports. You need to tweak WebPack config

Other resources:

@dzintars
dzintars / AsciiDoc.adoc
Last active June 26, 2021 12:19
AsciiDoc snippets for GitHub

Collection of things you can do with AsciiDoc in GitHub

@dzintars
dzintars / project-quay-setup.md
Last active May 15, 2023 14:08
How to setup Quay Image Registry for the local development and testing

[UPDATE] by Dzintars Klavins @ 2023-05-15

These instructions is no more quite accurate. Current setup is much more simpler. Probably I will update these instructions at some point.

[WIP] by Dzintars Klavins @ 2021-08-28

Project Quay Setup

These instructions is written for myself as an reminder guide. It is higly possible that they are wrong, outdated, un-maintained.

@dzintars
dzintars / GetWinKey.vbs
Last active November 11, 2021 19:40
Get Windows 7 key
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
@dzintars
dzintars / index.md
Last active January 14, 2024 16:40
How to setup Ansible Collection

How to setup Ansible Collection

I hope to collect bits and pieces on how to setup Ansible Collection project for local development and testing with Molecule.

Structure

  • ~/code/github.com/user/namespace/
    • .skeleton/
    • collection-a/
    • collection-b/