Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View yanickxia's full-sized avatar
:octocat:
Play with Rust

Yanick.xia yanickxia

:octocat:
Play with Rust
View GitHub Profile
@shekohex
shekohex / wezterm.applescript
Created June 13, 2022 12:49
Wezterm with Alfred Custom Terminal
on alfred_script(q)
tell application "wezterm" to activate
do shell script "/Applications/WezTerm.app/Contents/MacOS/wezterm cli send-text "
tell application "System Events" to keystroke q
tell application "System Events"
key code 36 -- enter key
end tell
end alfred_script
@itzg
itzg / LoginWebFilter.java
Created April 22, 2018 13:10
Custom Spring WebFlux AuthenticationWebFilter
import org.springframework.http.HttpMethod;
import org.springframework.http.codec.ServerCodecConfigurer;
import org.springframework.security.authentication.ReactiveAuthenticationManager;
import org.springframework.security.web.server.authentication.AuthenticationWebFilter;
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatchers;
public class LoginWebFilter extends AuthenticationWebFilter {
private final ServerCodecConfigurer serverCodecConfigurer;
/**
@teknoraver
teknoraver / unixhttpc.go
Last active March 21, 2024 11:48
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@apatrida
apatrida / VertxHttpServletRequest.java
Last active November 25, 2022 18:45
Vert-x3 wrappers for HttpServletRequest and HttpServletResponse
package com.collokia.webapp.routes;
import io.netty.handler.codec.http.HttpHeaders;
import io.vertx.core.net.SocketAddress;
import io.vertx.ext.web.RoutingContext;
import io.vertx.ext.web.Session;
import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import javax.servlet.*;