Skip to content

Instantly share code, notes, and snippets.

View lfuelling's full-sized avatar
⚠️
thisisunsafe

Lerk lfuelling

⚠️
thisisunsafe
View GitHub Profile
@lfuelling
lfuelling / distro
Created October 28, 2021 18:14 — forked from riptidewave93/distro
LibreNMS /usr/bin/distro script
#!/usr/bin/env sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=$(uname -s)
REV=$(uname -r)
#MACH=$(uname -m)
if [ "${OS}" = "SunOS" ] ; then
OS=Solaris
ARCH=$(uname -p)
@lfuelling
lfuelling / spectre.c
Created January 8, 2018 23:57 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif