Skip to content

Instantly share code, notes, and snippets.

@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active March 11, 2026 10:13
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@napicella
napicella / main.go
Created February 29, 2020 17:50
Companion code for the Linux terminals blog series
// Companion code for the Linux terminals blog series: https://dev.to/napicella/linux-terminals-tty-pty-and-shell-192e
// I have simplified the code to highlight the interesting bits for the purpose of the blog post:
// - windows resizing is not addressed
// - client does not catch signals (CTRL + C, etc.) to gracefully close the tcp connection
//
// Build: go build -o remote main.go
// In one terminal run: ./remote -server
// In another terminal run: ./remote
//
// Run on multiple machines:
@yat90
yat90 / jsonb.kt
Last active February 3, 2023 05:08
import com.google.gson.Gson
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.Function
import org.jetbrains.exposed.sql.statements.api.PreparedStatementApi
import org.postgresql.util.PGobject
fun <T : Any> Table.jsonb(name: String, klass: Class<T>, gson: Gson, nullable: Boolean): Column<T> {
return registerColumn<T>(name, JsonColumnType(klass, gson, nullable))
}
@shantanugadgil
shantanugadgil / zk_starter.bash
Created January 2, 2020 07:12
Zookeeper started script with some boilerplate stuff
#!/bin/bash
set -u
set -e
trap _error_exit ERR
_error_exit()
{
echo "ERROR EXIT"
@shantanugadgil
shantanugadgil / generate_job_file.bash
Created January 2, 2020 07:10
generator to create the zookeeper job file
$ cat generate_job_file.bash
#!/bin/bash
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
set -u
job_file="zookeeper.nomad"
cat > ${job_file} <<EOF
@kekru
kekru / 1-Enable Docker Remote API with TLS client verification.md
Last active September 20, 2025 16:38
Docker Remote API with client verification via daemon.json

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

" To get a list of Actions run `:actionlist `
" let mapleader = ','
" let mapleader = " "
let mapleader = "\<SPACE>"
set ignorecase smartcase
set NERDTree
set hlsearch
set showmode
set scrolloff=5
@kekru
kekru / Docker connect to remote server.md
Last active March 21, 2025 01:29
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@ssebastianj
ssebastianj / bindkey.md
Last active January 5, 2026 14:42
zsh bindkey commands
Shortcut Action
CTRL+@ set-mark-command
CTRL+A beginning-of-line
CTRL+B backward-char
CTRL+D delete-char-or-list
CTRL+E end-of-line
CTRL+F forward-char
CTRL+G send-break
CTRL+H backward-delete-char
@kryss
kryss / 撤掉X5情愿书
Last active April 30, 2021 16:50
撤掉X5情愿书
我是一个普通的H5开发者,我们花了10来个月做了一款微信应用,
但是因为最新版本的微信,选择使用了还没成熟的X5浏览器,
导致我们的应用在安卓版上完全无法使用 REST H5特效。
我相信这个世界上还有很多和我一样,因为这个问题头痛的开发猿。
所以希望能通过这个请愿书,感动TX的领导们,你们向他们学习:https://github.com/crosswalk-project/crosswalk
希望你们不要让我们开发者失望,X5真的是没法用,而且也没法改成能用,很多项目真的等不了。
如果你是开发猿请加颗星,希望能通过群众的响应改善大家的开发环境。