Skip to content

Instantly share code, notes, and snippets.

@mowings
mowings / tensorflow.nim
Created February 26, 2023 17:45 — forked from genotrance/tensorflow.nim
Nim wrapper for tensorflow using nimterop
# nim c -d:FLAGS tensorflow.nim
#
# FLAGS
# -d:capiDL
# -d:capiSetVer=
import os
import nimterop/[build, cimport]
@mowings
mowings / README.md
Created September 15, 2022 20:33 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
8.2.2. TCP log format
---------------------
The TCP format is used when "option tcplog" is specified in the frontend, and
is the recommended format for pure TCP proxies. It provides a lot of precious
information for troubleshooting. Since this format includes timers and byte
counts, the log is normally emitted at the end of the session. It can be
emitted earlier if "option logasap" is specified, which makes sense in most
environments with long sessions such as remote terminals. Sessions which match
the "monitor" rules are never logged. It is also possible not to emit logs for
@mowings
mowings / reload-config-postgresql.md
Created August 25, 2020 13:41 — forked from tralston/reload-config-postgresql.md
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
package main
import (
"fmt"
"github.com/julienschmidt/httprouter"
"golang.org/x/net/websocket"
"net/http"
"log"
)