Skip to content

Instantly share code, notes, and snippets.

@nstanke
nstanke / enable_ws.sh
Last active Oct 20, 2022
Synology Bitwarden_rs Websocket setup without SSH
View enable_ws.sh
#!/bin/bash
LOC_DIR="/etc/nginx"
if [ ! -f $LOC_DIR/ws.locations ]; then
echo """
location /notifications/hub {
proxy_pass http://localhost:$3;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
@nstanke
nstanke / mailinabox.mobileconfig
Created Nov 4, 2014
example iOS mobile config
View mailinabox.mobileconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>CalDAVAccountDescription</key>
<string>Mail-in-a-box Calendar</string>
<key>CalDAVHostName</key>
@nstanke
nstanke / sslh
Created Aug 3, 2014
sslh (etc/default/sslh) config for SSL, SSH & OpenVPN | apt-get install sshl
View sslh
# Default options for sslh initscript
# sourced by /etc/init.d/sslh
# Disabled by default, to force yourself
# to read the configuration:
# - /usr/share/doc/sslh/README.Debian (quick start)
# - /usr/share/doc/sslh/README, at "Configuration" section
# - sslh(8) via "man sslh" for more configuration details.
# Once configuration ready, you *must* set RUN to yes here
# and try to start sslh (standalone mode only)
View keybase.md

Keybase proof

I hereby claim:

  • I am nstanke on github.
  • I am norman (https://keybase.io/norman) on keybase.
  • I have a public key whose fingerprint is 9FAC 6491 3836 5BBA 26C8 C7CA 2DB8 7445 6CF2 9E5E

To claim this, I am signing this object:

@nstanke
nstanke / http.go
Created Apr 11, 2012
Simple Golang weberserver
View http.go
package main
import (
"net/http"
"log"
)
func main() {
err := http.ListenAndServe("", http.FileServer(http.Dir("/var/www/go")))
if err != nil {
@nstanke
nstanke / sslh
Last active Aug 29, 2015
sslh-public-ip
View sslh
# Default options for sslh initscript
# sourced by /etc/init.d/sslh
# Disabled by default, to force yourself
# to read the configuration:
# - /usr/share/doc/sslh/README.Debian (quick start)
# - /usr/share/doc/sslh/README, at "Configuration" section
# - sslh(8) via "man sslh" for more configuration details.
# Once configuration ready, you *must* set RUN to yes here
# and try to start sslh (standalone mode only)