Skip to content

Instantly share code, notes, and snippets.

View joshleecreates's full-sized avatar

Josh Lee joshleecreates

View GitHub Profile
@joshleecreates
joshleecreates / picluster.md
Created February 26, 2025 20:47
Raspberry Pi Cluster with ClickHouse and K3s Setup Steps

Step 1: Setup the Raspberry Pis

  1. Install Raspbian Lite on an SD Card
  2. Boot the Pi
  3. Copy the disk to the NVMe:
sudo dd if=/dev/mm** of=/dev/nvme** bs=32M
  1. Shutdown, remove the SD Card, and reboot
  2. Change the pi hostname to something unique
version: '3.8'
name: coroot
volumes:
prometheus_data: {}
clickhouse_data: {}
clickhouse_logs: {}
coroot_data: {}
node_agent_data: {}
@joshleecreates
joshleecreates / vm-profile.nix
Last active March 17, 2025 19:52
NixOS VM Profile
{ config, pkgs, modulesPath, lib, system, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
config = {
#Provide a default hostname
networking.hostName = lib.mkDefault "base";
def process_url(url) do
defaults = %{
thing: "thing1value"
}
uri = URI.parse(url)
params = URI.decode_query(uri.query, defaults) |> URI.encode_query
URI.merge(@base_url, uri.path <> "?" <> params) |> to_string
end
@joshleecreates
joshleecreates / classification_helper.ex
Last active February 7, 2017 04:14
An elixir helper for classifying text
@doc """
Example Usage
```
items = [
%{
name: "thing",
description: "foo bar baz"
},
%{
name: "thing two",