$ export DOCKER_HOST=tcp://fnord.local:2376 DOCKER_TLS_VERIFY=1
$ docker ps
An error occurred trying to connect: Get https://fnord.local:2376/v1.21/containers/json: x509: certificate is valid for fnord, 192.168.23.23 , localhost, not fnord.local
$ ssh admin@fnord.local
# /sbin/setcfg global realm local -f /etc/config/smb.conf
# /etc/init.d/network.sh restart
# hostname -f
fnord.local
# cd $(dirname $(readlink /etc/init.d/container-station.sh))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XDG_DATA_DIRS=/usr/local/share:/usr/share | |
XDG_CONFIG_DIRS=/etc/xdg | |
case $(uname) in | |
Linux) | |
XDG_CONFIG_HOME="$HOME/.config" | |
XDG_CACHE_HOME="$HOME/.cache" | |
XDG_DATA_HOME="$HOME/.local/share" | |
XDG_STATE_HOME="$HOME/.local/state" | |
XDG_RUNTIME_DIR="/run/user/$(id -u)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package demo | |
import ( | |
"context" | |
"net/http" | |
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime" | |
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" | |
"go.opentelemetry.io/otel" | |
"go.opentelemetry.io/otel/propagation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Script to open a sqlite3 database and dump all user tables to CSV files. | |
Tested in Unicode-rich environment. | |
Usage: | |
dumpsqlite3tocsv foo.db | |
""" | |
import sqlite3, csv, codecs, cStringIO, os, os.path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@doc """ | |
Forge links between spans. | |
Preferred, but not supported by our reporter: | |
:PARENT_LINKED_SPAN | |
|> :oc_span.link(link_trace_id, link_span_id, %{}) | |
|> :oc_trace.add_link(span_ctx) | |
... but that's ok, [Honeycomb can link using the attributes of extra spans][send-links]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flash configured LEDs on boot. | |
import aiko.led | |
import time | |
import binascii | |
DURATION_MS = 100 | |
COLOURS = ["e40303", "ff8c00", "ffed00", "008026", "004dff", "750787"] | |
GAMMAS = [v for v in binascii.a2b_base64(b"".join([ | |
# Overkill, but I wanted the orange to look orange. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Bundle the converter. | |
Inspiration: https://github.com/python-poetry/poetry/pull/2682 | |
""" | |
from argparse import ArgumentParser | |
from contextlib import contextmanager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(fn gl -> | |
:dbg.stop_clear() | |
repr = fn | |
%Phoenix.LiveView.Socket{} -> "socket" | |
v -> inspect(v) | |
end | |
{:ok, _} = | |
:dbg.tracer( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Smuggle do | |
@moduledoc """ | |
Make it easier to smuggle data from one system to another. | |
If your target is an `iex` prompt: | |
Smuggle.dump(value) | |
# copy | |
# paste into other iex |
NewerOlder