Skip to content

Instantly share code, notes, and snippets.

View yk-sgr's full-sized avatar

Yannick Seeger yk-sgr

View GitHub Profile
@yk-sgr
yk-sgr / combiner.js
Created November 14, 2023 15:32
Combine markdoc files
const fs = require('fs');
const path = require('path');
const { glob, globSync } = require('glob')
const outputPath = 'combined.markdoc'; // Output file
const directoryPath = path.resolve('./'); // Root directory of your project
// Function to concatenate files
const concatenateMarkdocFiles = (files) => {
let combinedContent = '';
const baseUrl = String.fromEnvironment('BASE_URL',
defaultValue: 'https://api.project.com');
@yk-sgr
yk-sgr / lyrics.txt
Last active December 26, 2020 13:11
This file has been truncated, but you can view the full file.
[Sample]
[Part 1]
Hast du Bock auf Party, ja, dann fuck ma' nicht die Party ab
Bässe aus der 808-Anlage, so laut, du hörst
Es hallend durch die Nachbarschaft, Takt für Takt
Bis die Streifenwagen komm', dann wird alles abgesagt
Neues Spiel, Nacht für Nacht, Weed im Beutel fürs Studio abgepackt
Paff' ein Blunt, ein Zug - ich hab', wozu ihr Part macht
Lazy Lace Notorious, ihr seid Inglourious
@yk-sgr
yk-sgr / .env
Created November 18, 2020 11:43
Go Configuration 3/3
SERVICE_DEBUG=true
SERVICE_POSTGRES_DSN=postgresql://user@localhost
@yk-sgr
yk-sgr / main.go
Created November 18, 2020 11:33
Go Configuration 2/3
package main
import "fmt"
func main() {
cfg := LoadConfig()
fmt.Println(cfg.PostgresDSN)
}
@yk-sgr
yk-sgr / config.go
Last active November 18, 2020 11:54
Go Configuration -1/3
package main
import (
"log"
"github.com/joho/godotenv"
"github.com/kelseyhightower/envconfig"
)
type Config struct {
Debug bool `default:"false"`
@yk-sgr
yk-sgr / random_test.c
Created April 29, 2020 10:57
Random Generator
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
int main() {
srand(time(NULL));
for(int i = 0; i < 10; i++) {
srand(time(NULL));
printf("%i\n", rand() % 10);
}
@yk-sgr
yk-sgr / Dockerfile
Created April 28, 2020 14:15
Go Multistage Docker
FROM golang:latest as builder
WORKDIR /app
ADD . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -o server cmd/server/main.go
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=builder /app/server .
CMD ["./server"]

Keybase proof

I hereby claim:

  • I am ForYaSee on github.
  • I am foryasee (https://keybase.io/foryasee) on keybase.
  • I have a public key whose fingerprint is 2C3B B2AF 383F 6A9A 73C4 4370 1E21 FC89 BF2C 52B6

To claim this, I am signing this object: