Skip to content

Instantly share code, notes, and snippets.

View owenthereal's full-sized avatar
🚀
Hacking

Owen Ou owenthereal

🚀
Hacking
View GitHub Profile
@IshaanAdarsh
IshaanAdarsh / GSoC ’23 Project-Report.md
Last active March 18, 2024 09:19
Google Summer of Code 2023 (PostgreSQL)

Google Summer of Code 2023 Final Work Product


gsoc


Introduction

Hydra Performance Microbenchmark

Important: This microbenchmark is not intended to represent any real workload. Compression ratios, and therefore performance, will depend heavily on the specific workload. This is only for the purpose of illustrating a "columnar friendly" contrived workload that showcases the benefits of columnar.

Schema

@mbierman
mbierman / addremotesyslog.sh
Last active May 27, 2024 10:35
Add a remote syslog server to Firewalla
#!/bin/bash
# v 2.1.0
syslog=/etc/rsyslog.d/09-externalserver.conf
# this logs notice and above. use *.* log everything.
filter=*.notice
server=192.168.0.19 # Change the server to the IP of your syslog server.
port=514
hostname=firewalla
valid=$(grep "$server:$port" $syslog 2>/dev/null)
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active July 24, 2024 14:32
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@satrobit
satrobit / xdp.md
Created August 8, 2021 16:17
Absolute Beginner's Guide to BCC, XDP, and eBPF

Introduction

If you're reading this, chances are you have some idea of eBPF and XDP. In this article, we'll write an eBPF program that will count and categorize packets based on the destination port.

eBPF

Writing low-level tracing, monitoring, or network programs in Linux is not easy. Through all the layers of the kernel, people have been squeezing every bit of performance they could get.

And that's where eBPF comes in. eBPF is basically an extended and modern variation of BPF which is like a virtual machine inside the Linux kernel. It can execute user-defined programs inside a sandbox in the kernel.

These programs can be executed in various hook points but we will focus on XDP for now.

@mashhoodr
mashhoodr / cloudflare_worker_proxy.js
Last active October 10, 2022 16:01
A simple proxy pass script for Cloudflare Worker which handles the basic cases
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Respond to the request
* adapted from https://github.com/xiaoyang-liu-cs/workers-proxy
* @param {Request} request
*/
async function handleRequest(request) {
@alexellis
alexellis / krustlet-inlets.md
Last active November 6, 2021 17:22
krustlet-inlets

Tutorial - Connect your krustlet to any Kubernetes cluster with inlets

  • Provision a cluster on DigitalOcean Kubernetes or AKS

  • Prepare your krustlet and get its certificates

  • Create a Kubernetes secret for inlets

export TOKEN=$(head -c 16 /dev/urandom |shasum|cut -d- -f1)
@carlwgeorge
carlwgeorge / gnome.yml
Last active July 22, 2024 03:25
ansible playbook for my gnome setup
# https://docs.ansible.com/ansible/latest/modules/dconf_module.html
#
# To determine what dconf keys and values to use, you can run `dconf watch /`
# in a terminal as you make changes in settings or tweaks. You can also use
# `dconf read <key>` and `dconf write <key> <value>` to experiment with various
# settings. The dconf-editor application is also useful for exploring various
# keys along with their descriptions.
- hosts: localhost
tasks:
@sbernard31
sbernard31 / test.c
Last active March 11, 2023 18:04
UDP load balancer proto using bcc (XDP/Bpf)
#define KBUILD_MODNAME "foo"
#include <uapi/linux/bpf.h>
#include <linux/bpf.h>
#include <linux/icmp.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>
@dannguyen
dannguyen / google-speech-2-text-README.md
Last active March 2, 2022 09:31
How Google's text-to-speech API performs when reading the New York Times

Demo of Google text-to-speech Wavenet API on a NYT article

Was curious if Google's text-to-speech API might be good enough for generating audio versions of stories on-the-fly. Google has offered traditional computer voices for awhile, but last year made available their premium WaveNet voices, which are trained using audio recorded from human speakers, and are purportedly capable of mimicking natural-sounding inflection and rhythm.

tl;dr results

Pretty good...but I honestly can't tell the difference between the standard voice and the WaveNet version, at least when it comes to intonation and inflection. The first 2 grafs of this NYT story, roughly 85 words/560 characters, took less than 2 seconds to process. The result in both cases is a 37-second second audio file.

  • The M