Skip to content

Instantly share code, notes, and snippets.

View bubbajoe's full-sized avatar
🏠
Working from home

Joe Williams bubbajoe

🏠
Working from home
View GitHub Profile
Server.java
/* ------------------
Server
usage: java Server [RTSP listening port]
---------------------- */
import java.io.*;
import java.net.*;
@rolaveric
rolaveric / reverseProxy.go
Created February 23, 2014 06:25
Example of a reverse proxy written in Go
import (
"net/http"
"net/http/httputil"
"net/url"
"fmt"
)
func main() {
// New functionality written in Go
http.HandleFunc("/new", func(w http.ResponseWriter, r *http.Request) {
upstream node_server {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
use axum::{
extract::{Extension, Path},
routing::get,
AddExtensionLayer, Router,
};
use hyper::service::make_service_fn;
use std::{
convert::Infallible,
sync::{Arc, Mutex},
};
@a-agmon
a-agmon / df_lambda.rs
Last active November 13, 2024 13:36
Rusty AWS Lambda with Data Fusion and Iceberg
use std::{sync::Arc, time::Instant};
use datafusion::{
arrow::{array::RecordBatch, json::ArrayWriter},
prelude::SessionContext,
};
use iceberg::{io::FileIO, table::StaticTable, TableIdent};
use iceberg_datafusion::IcebergTableProvider;
use lambda_runtime::{
run, service_fn,