pacmd list-sinks
# revised: module-virtual-sink -> module-remap-sink
pacmd load-module module-remap-sink #master=<index or name of sink to filter>
$ docker save <image> | ssh user@host "docker load" # old method
$ docker context create <contextName> --docker "host=ssh://user@host"
$ docker context use <contextName>
$ docker compose up -d # no need to copy env files to host
LESS
environment variable to FRX
if it's unset@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().csrfTokenRepository(csrfTokenRepository());
}
@Bean
public CsrfTokenRepository csrfTokenRepository() {
// reads X-XSRF-TOKEN header and sets XSRF-TOKEN cookie
final CookieCsrfTokenRepository repository = new CookieCsrfTokenRepository();
// js needs to read the cookie value to set the header
repository.setCookieHttpOnly(false);
return repository;
}
}
btoa
is Binary string to Base64-encoded ASCII
string. Not Base64 to Anything:set tw=72 | set cc=72
content
GET request search parameter, then returns the HTML page
rendered by marked.@media (prefers-color-scheme: dark)
and
user_pref("ui.systemUsesDarkTheme", 1);
in firefox.wrangler dev
that there are No deployments specified!
if the CF_ZONE_ID
is not exported
or zone_id
is not set in the wrangler.toml
Host
header to the name of the workers.dev domain rather than
my registered domain name. I'm already terminating SSL (as
you can see) at the load balancer so I need to proxy to
port 80.backend cloudflare
http-request replace-header Host .* <worker-name>.workers.dev
server cloudflare-worker <my-domain-name>:80
:DiffOrig
has different capitalization than other
diff commands (why?) so if you don't set ignorecase
it
won't autocomplete with other :diff*
ex commands.When you need to manage multiple SSH keys (e.g. some services require
passwords and some forbid them) you can create ~/.ssh/config
and
specify identity files and other service specific options on a
host-specific level.
Host git.sr.ht
User git
IdentityFile ~/.ssh/sourcehut_id_rsa
Host github.com
User git
IdentityFile ~/.ssh/id_rsa
Kubeadm
iptables rules adds fwmark that may need to be added to
wireguard in order to allow packets throughMy HAProxy config terminates TLS at the load balancer and proxies to my VPS but also proxies via TCP to the on-premise applications over wireguard depending on the host. With only a single public IP address I needed to create something like a TCP-to-HTTP loop
frontend ericleedev
bind :443
mode tcp
tcp-request inspect-delay 5s
tcp-request content accept if { req.ssl_hello_type 1 }
acl host_ericleedev req.ssl_sni -i ericlee.dev
use_backend tcp-to-http if host_ericleedev
use_backend site if !host_ericleedev
frontend terminate-ssl
bind :8443 ssl crt ericlee.dev.pem
use_backend cloud
backend tcp-to-http
mode tcp
server tcp-http 127.0.0.1:8443
backend cloud
mode http
server cloud-vps ericlee.dev:443 ssl verify none
backend site
mode tcp
server wireguard 10.8.0.3
In nginx $request_uri
exposes the request path to the response context. In
HAProxy the equivalent would be to get the path
sample in the http-request
statement, set it on a variable on the txn
scope, then reference the variable
in the http-response
statement. The available scopes are (proc, sess, txn, req, res
)
and the variable name needs to be prefixed with the scope.
http-request set-var(txn.path) path
http-response set-header X-Path-Example "%[var(txn.path)]"
I figured out sourcehut build secrets. Need to set +x
before sourcing the secret
variables because of the default build environment
Onion-Location
header can be used to advertise your onion service directly to
the browser in the URL barnet.ipv6.conf.all.disable_ipv6 = 1
will
throw an RTNETLINK answers: Permission denied
error and remove the interface regardless of
any other successfully added IPv4 addressesracadm sslresetcfg
or racadm racreset
to reset the entire controller. racadm racresetcfg
will reset the controller to factory defaultskubeadm reset
doesn't delete the $HOME/.kube/config file so even though worker nodes can join
the cluster a new x509 cert will be generated you the kubectl get nodes
will fail to verifypersistent-keepalive
value if the
connection is tracked behind a firewall or NAT so it doesn't timeoutdefault-src 'none'; img-src data:; style-src 'unsafe-inline'
image
tag can be used to reference external resources