Skip to content

Instantly share code, notes, and snippets.

@Badel2
Badel2 / spectre.c
Last active March 12, 2023 00:18
Spectre attack example implementation
/* https://spectreattack.com/spectre.pdf */
#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
@gsora
gsora / openvpn-libressl-static.sh
Last active March 4, 2020 15:10
Builds OpenVPN 2.4.2 with LibreSSL 2.4.5 statically on OpenBSD 6.1
#!/bin/sh
# Originally written by https://image.rayservers.com/ssl/vpn/openvpn+libressl+musl-static-compile.sh
# Dependencies: wget
set -e
set -x
[ ! -d ~/openvpn-libressl ] && mkdir ~/openvpn-libressl
cd ~/openvpn-libressl
@EntropyWorks
EntropyWorks / add-ssh-keys.yml
Last active March 29, 2022 21:04
Add all the hosts from your ansible inventory to your .ssh/known_hosts and also use ssh-copy-id to add keys to the hosts
---
# Original idea found at http://stackoverflow.com/a/39083724
#
# ansible -i inventory.ini add-ssh-keys.yml
#
- name: Store known hosts of 'all' the hosts in the inventory file
hosts: localhost
connection: local
vars:
ssh_known_hosts_command: "ssh-keyscan -T 10"