Notes by the day

2022-12-22

pacmd list-sinks

# revised: module-virtual-sink -> module-remap-sink
pacmd load-module module-remap-sink #master=<index or name of sink to filter>

2022-05-22

2022-05-21

$ 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

2021-10-15

2021-08-07

@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;
      }
}

2021-02-19

2021-01-08

2020-12-30

2020-12-23

2020-12-21

2020-11-02

2020-09-01

2020-08-30

backend cloudflare
        http-request replace-header Host .* <worker-name>.workers.dev
        server cloudflare-worker <my-domain-name>:80

2020-08-02

2020-08-01

2020-07-26

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

2020-07-25

2020-07-24

2020-07-14

2020-07-13

2020-07-07

2020-06-24

2020-06-21

2020-06-18