Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
fuck it, ship it

zekro zekroTJA

🤔
fuck it, ship it
View GitHub Profile
@zekroTJA
zekroTJA / youtubedl-download-all.bash
Created Mar 12, 2021
Small bash script to download a whole YouTube playlist via youtube-dl and convert it to a desired format using ffmpeg.
View youtubedl-download-all.bash
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 Jul 9, 2020
Semantic Versioning of Minecraft Modpacks
View mc-modpack-semver.md

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 Jun 23, 2020
Script to walk through a git repository commit by commit and count the lines of code.
View gitwalker.bash
#!/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"
View go-chart-debug.Dockerfile
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 Nov 26, 2019
Angular Control Value Accessor Component Example
View ControlValueExampleComponent.ts
/** @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 Nov 7, 2019
random string generator in TypeScript
View randomString.ts
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));
}
View keybase.md

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 Aug 21, 2019
Docker compose and NGINX configuration for setting up GitLab with kerberos as AD authentication
View docker-compose.yml
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'
View cloudSettings
{"lastUpload":"2020-03-31T11:31:46.511Z","extensionVersion":"v3.4.3"}
@zekroTJA
zekroTJA / go-project-setup.sh
Created Apr 19, 2019
Setup script for go projects
View go-project-setup.sh
#!/bin/bash
DIRS=(
"assets"
"build"
"cmd"
"config"
"docs"
"internal"
"pkg"