Skip to content

Instantly share code, notes, and snippets.

View junaidk's full-sized avatar

Junaid Khalid junaidk

  • Mirantis
  • Berlin
View GitHub Profile
@pydevops
pydevops / k8s-crd.md
Last active September 1, 2023 00:41 — forked from smileisak/operators.md
k8s crd operator

Some useful resources regarding Kubernetes Operators, CRDs, etc.

@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@Koubek
Koubek / VPN-client-on-Docker.md
Last active March 16, 2023 22:42
How to connect a PC behind VPN gateway using Docker

VPN-client-on-Docker


This approach uses Docker containers based on Linux kernel. Due to this fact we use one shared Linux server with multiple VPN containers. Then everyone in the company can access the remote system using the shared instances.

I haven`t tested this concept on my Win10 machine, running Linux containers (switching Docker to Linux containers mode). I suppose in the near future will be possible run containers on both platforms simultaneously. Even then I am not sure if the networking stack of Docker on Windows will allow us to run these VPN client containers correctly. I will test it in the future or if anyone else will do I`ll be happy to know the results.


package main
import "fmt"
// WithPrefix
type prefixOption struct{}
func WithPrefix() interface {
GetOption
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@scottcagno
scottcagno / bitvec.go
Created March 13, 2016 23:17
Golang Bit-Vector/Array Implementation
package bitvec
import (
"log"
"go/build"
)
// this is the word size of an int(32)
// in bits. an int(32) requires a min-
// imum of 4 bytes, each of which are
@yowu
yowu / HttpProxy.go
Last active April 27, 2024 20:17
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@reterVision
reterVision / udp_client.go
Created July 12, 2014 07:50
A dummy UDP hole punching sample in Go
package main
import (
"encoding/json"
"fmt"
"log"
"net"
"os"
"time"
)
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube