Skip to content

Instantly share code, notes, and snippets.

View divad1196's full-sized avatar

divad1196

View GitHub Profile
@divad1196
divad1196 / string_pool.cpp
Last active November 20, 2022 11:16
Storage optimized string container
// https://www.linkedin.com/feed/update/urn:li:activity:6999211953961275392/?commentUrn=urn%3Ali%3Acomment%3A(groupPost%3A86782-6999211953495715840%2C7000029997675487233)&dashCommentUrn=urn%3Ali%3Afsd_comment%3A(7000029997675487233%2Curn%3Ali%3AgroupPost%3A86782-6999211953495715840)
#include<string_view>
#include<vector>
#include<iostream>
#include<cstring>
// g++ --std=c++17 string_pool.cpp -o string_pool
/*
Total overhead (i.e. whats more than just the chars):
- incompressible: 1 char*, 1 size_t, 1 vector (2 size_t and 1 ptr).
@divad1196
divad1196 / 001-elksetup.sh
Created June 25, 2022 16:56 — forked from zebde/001-elksetup.sh
ELK Setup Script
#!/bin/bash
# ---------------------------------------------------------------------------
# elksetup.sh - Ubuntu 14.04 based ELK installation script
# Copyright 2015, https://github.com/zebde
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or