Skip to content

Instantly share code, notes, and snippets.

🤔
🤔

zekro zekroTJA

🤔
🤔
Block or report user

Report or block zekroTJA

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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-02-04T09:42:42.720Z","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"
@zekroTJA
zekroTJA / Makefile
Last active Apr 2, 2019
Makefile for Go Applications
View Makefile
# TEMPLATE MAKEFILE FOR GO APPLICATIONS
#
# This Makefile is capable of:
# - defautl go commands like build, run,
# test and golint
# - cross compiling (see make help)
# - automatic versioning using git tag
# and ldflags
#
# Covered by MIT License
@zekroTJA
zekroTJA / go-os-arch.md
Created Mar 11, 2019 — forked from asukakenji/go-os-arch.md
Go (Golang) GOOS and GOARCH
View go-os-arch.md

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@zekroTJA
zekroTJA / gitToDiscordWebhook.bash
Created Jan 18, 2019
update hook for git to push embed message to Discord webhook (with Gavatar Avatar support)
View gitToDiscordWebhook.bash
#!/bin/bash
# --- SETTINGS
webhookUrl="WEBHOOK_URL"
# ------------
refname=$1
oldrev=$2
newrev=$3
@zekroTJA
zekroTJA / ffmpeg_video_tutorial.md
Last active Dec 30, 2018
How to edit your videos with ffmpeg
View ffmpeg_video_tutorial.md

Using ffmepg to 'cut' your videos

The advantage over using a "classical" cutting program

If you record your videos with OBS, you can record them in the format of mp4, which is actually container format, which includes video, audio (and other stuff like subtitles for example) in a container file. With ffmpeg, you are able to extract and work with those streams in the containers. That means, you can extract and edit streams directly from and inside the container without rendering the whole video file, which saves a huge ammount of time and resources.

Install ffmpeg

Go to ffmpeg.org and download the latest build for your system. If you are using linux, you can also install it by your package manager of course. If you decided to download the binaries, place them somewhere you want (on Windows C:/Program Files/ffmpeg/ for example) and define the location of the "bin" folder in the ffmpeg folder in your path variables.

You can’t perform that action at this time.