Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zekroTJA's full-sized avatar
🚀
Fuck it, ship it!

Ringo Hoffmann zekroTJA

🚀
Fuck it, ship it!
View GitHub Profile
@zekroTJA
zekroTJA / my-most-useful-go-packages.md
Last active May 9, 2021 10:05
A list of (in my opinion) the most useful go packages I use for my own projects.
@zekroTJA
zekroTJA / youtubedl-download-all.bash
Created March 12, 2021 16:00
Small bash script to download a whole YouTube playlist via youtube-dl and convert it to a desired format using ffmpeg.
FORMAT="ogg"
[ -z $2 ] || FORMAT=$2
youtube-dl -citx $1
mkdir out
for F in *; do
case "$F" in
(*.bash | *.sh) continue;;
@zekroTJA
zekroTJA / mc-modpack-semver.md
Last active February 11, 2024 15:53
Semantic Versioning of Minecraft Modpacks

Semantic Versioning of Minecraft Modpacks

v.1.0.0-rc.2
2020-07-09

Summary

The version number goes after follwoing format.

Simple: MAJOR.MINOR.PATCH
@zekroTJA
zekroTJA / gitwalker.bash
Created June 23, 2020 10:09
Script to walk through a git repository commit by commit and count the lines of code.
#!/bin/bash
REPO_URL=$1
BRANCH=$2
TMP_DIR="./.tmp"
CLOC_EXCLUDED_DIRS="node_modules,vendor"
CLOC_EXCLUDED_LANGS="JSON,Markdown,YAML,SVG,SQL,Dockerfile,make"
OUT_FILE="./results.csv"
FROM golang:1.13-alpine
WORKDIR /test
RUN apk add curl git
RUN go get -u github.com/wcharczuk/go-chart
RUN curl -Lo test.go https://raw.githubusercontent.com/wcharczuk/go-chart/master/examples/bar_chart/main.go
RUN touch output.png
ENTRYPOINT ["go", "run", "test.go"]
@zekroTJA
zekroTJA / ControlValueExampleComponent.ts
Created November 26, 2019 08:47
Angular Control Value Accessor Component Example
/** @format */
import { Component, forwardRef } from '@angular/core';
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';
export const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR,
// tslint:disable-next-line: no-use-before-declare
useExisting: forwardRef(() => EntryInputComponent),
multi: true,
@zekroTJA
zekroTJA / randomString.ts
Created November 7, 2019 14:22
random string generator in TypeScript
export function randomString(n: number, charset?: string): string {
let res = '';
let chars =
charset || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let charLen = chars.length;
for (var i = 0; i < n; i++) {
res += chars.charAt(Math.floor(Math.random() * charLen));
}

Keybase proof

I hereby claim:

  • I am zekrotja on github.
  • I am zekrodev (https://keybase.io/zekrodev) on keybase.
  • I have a public key ASBW8pQDJzn4mLcExivvHMaaqm4rUpEn-lVXhNS6mmhJ-Ao

To claim this, I am signing this object:

@zekroTJA
zekroTJA / docker-compose.yml
Last active August 21, 2019 13:54
Docker compose and NGINX configuration for setting up GitLab with kerberos as AD authentication
version: '3'
services:
# We will use an enginx layer to simply encrypt the
# HTTP traffic with SSL using a self singed certificate.
nginx:
image: 'nginx:latest'
ports:
- '80:80'
{"lastUpload":"2020-03-31T11:31:46.511Z","extensionVersion":"v3.4.3"}