Skip to content

Instantly share code, notes, and snippets.

View rustyconover's full-sized avatar
🕶️
The future is so bright.

Rusty Conover rustyconover

🕶️
The future is so bright.
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rustyconover
rustyconover / listen.js
Created January 12, 2021 16:12
Listen to Icecast Stream
function listenToStream(stream_id: number, description: string) {
const options = {
hostname: 'broadcastify.cdnstream1.com',
port: 443,
headers: {
'sec-ch-ua-mobile': '?0',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',
'Accept': '*/*',
'Origin': 'https://www.broadcastify.com',
@rustyconover
rustyconover / load-and-analyze-samples.js
Created January 12, 2021 18:17
Load and Analyze PCM samples
// Keep an array of indexes of loud samples.
const loud_indexes = [0];
{
const pcm_data = fs.readFileSync(pcm_output, { encoding: null });
const pcm_values = new Int16Array(pcm_data.buffer);
// The first segment may be longer than normal due to Icecast
// buffering.
if (pcm_values.length > (window_length / 1000) * sample_rate * 1.2) {
return;
@rustyconover
rustyconover / query-farm-cla.md
Created December 6, 2025 13:13
Contributor License Agreement for Query.Farm LLC

Query.Farm LLC Contributor License Agreement (ICLA, License-Agnostic)

Version 1.2 — License-Agnostic

This Contributor License Agreement ("CLA") applies to any contributions you submit to Query.Farm LLC ("Company") repositories, whether open-source, proprietary, or mixed-license.


1. Assignment of Copyright

You hereby assign to Query.Farm LLC all right, title, and interest in any copyrightable work of authorship that you submit ("Contribution"). This assignment is:

@rustyconover
rustyconover / play-query-song.py
Created January 12, 2026 17:20
Nyan Cat query music for DuckDB Events extension
#!/usr/bin/env python3
"""
Event handler that plays nyan-cat.mp3 while queries are running.
Starts playback on query_begin, stops on query_end.
Works on macOS, Linux, and Windows.
"""
import json
import os
import signal
#!/usr/bin/env python3
"""
Demonstration of Arrow IPC serialization size and why zero-row record batches
are not optimal for delivering arbitrary binary data in an IPC stream.
"""
import io
import pyarrow as pa
import pyarrow.ipc as ipc