Skip to content

Instantly share code, notes, and snippets.

View DenisNovac's full-sized avatar

Denis Novac DenisNovac

View GitHub Profile
@jvdi
jvdi / dockerizeWireguardOverWebsocket.md
Last active September 30, 2025 18:18
Set Up a dockerize Wireguard VPN Server over WebSocket Tunneling

This tutorial good for Linux or Unix system at the end need to run bash script for connect
(Also it's have some technic for use in windows - Explained at client install section.)

VPS => virtual private server as wiregurd vpn server

Requirements

  • Assuming the firewall is off (Not Secure - it's just for test so in production: config firewall)
  • VPS have docker and docker-compose (for install instrucrion : docker site full explained)
  • In VPS enable net.ipv4.ip_forward=1 at /etc/sysctl.conf (or /etc/sysctl.d/99-sysctl.conf) and reboot your system
  • Have access to root user in VPS
@todokr
todokr / RefinedWithNewType.scala
Last active February 25, 2023 18:15
refined + newtype + circe
import Models._
import eu.timepit.refined.api._
import eu.timepit.refined.boolean.{And, Or}
import eu.timepit.refined.collection._
import eu.timepit.refined.numeric._
import eu.timepit.refined.string._
import io.circe._
import io.circe.generic.semiauto._
import io.circe.parser._
import io.estatico.newtype.Coercible
@rkrzewski
rkrzewski / DoobieLiquibase.scala
Created October 19, 2018 16:00
Liquibase migration with Doobie
import cats._
import doobie._
import doobie.implicits._
import liquibase.Liquibase
import liquibase.database.DatabaseFactory
import liquibase.database.jvm.JdbcConnection
import liquibase.resource.ClassLoaderResourceAccessor
object LiquibaseMigration {
def run[F[_]: Monad](xa: Transactor[F]): F[Unit] =
@vorozhba
vorozhba / Как удалить commit в Github.txt
Last active November 16, 2025 11:06
Как удалить commit в Github
1. Получаем хэш-код коммита, к которому хотим вернуться.
2. Заходим в папку репозитория и пишем в консоль:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@jcataluna
jcataluna / gist:1dc2f31694a1c301ab34dac9ccb385ea
Created July 8, 2016 17:23
Script to save all images from a docker-compose.yml file
#!/bin/bash
mkdir -p out
for img in `grep image $1| sed -e 's/^.*image\: //g'`;
do
cleanname=${img/\//-}
tag=`docker images | grep $img | awk '{print $2}'`
echo "Exporting image: $img, tag:$tag ($cleanname)..."
docker save $img -o out/$cleanname.tar