Skip to content

Instantly share code, notes, and snippets.

View alexanderkjeldaas's full-sized avatar

Alexander Kjeldaas alexanderkjeldaas

  • Founder of a startup
  • Scandinavia
View GitHub Profile

kjeldaas Alexander Kjeldaas

Keybase proof

I hereby claim:

  • I am alexanderkjeldaas on github.
  • I am kjeldaas (https://keybase.io/kjeldaas) on keybase.
  • I have a public key ASAysRZ5gvRIQPaCvSirL3sgW1KJD__6MrCHXPY6dMyOOQo
// g++ -O3 -g -std=c++17 test.cc -lboost_filesystem -lboost_system -lpthread -lboost_iostreams -lboost_thread
#include <iostream>
#include <string>
#include <bitset>
#include <thread>
// #include <experimental/barrier>
#include <boost/thread/barrier.hpp>
#include <boost/iostreams/device/mapped_file.hpp>
#include <boost/filesystem.hpp>
#define BOOST_DISABLE_ASSERTS 1
@alexanderkjeldaas
alexanderkjeldaas / hetzner-cloud-wipe-and-install-nixos.sh
Last active April 16, 2021 16:59 — forked from nh2/hetzner-dedicated-wipe-and-install-nixos.sh
Example script to install NixOS on a Hetzner dedicated server via the Hetzner rescue mode
#!/usr/bin/env bash
# Installs NixOS on a Hetzner Cloud CX51 server, wiping the server.
#
# This is for a specific server configuration; adjust where needed.
#
# Prerequisites:
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc.
#
# Usage:
@alexanderkjeldaas
alexanderkjeldaas / setup-k3s-on-hetzner.sh
Last active January 10, 2024 19:07
Setup k3s on Hetzner with CSI drivers
#!/bin/bash
LOCATION=${HCLOUD_LOCATION:-nbg1-dc3}
if [ -z "$HCLOUD_TOKEN" ]; then
echo "You need to set HCLOUD_TOKEN to an Hetzner API token!";
exit 1
fi
if [ -z "$SSH_KEY" ]; then
@alexanderkjeldaas
alexanderkjeldaas / out.txt
Created May 15, 2019 20:15
ansible output
PLAY [localhost] *******************************************************************************************************************************************************************************************
TASK [Check ansible version >=2.7.8] ***********************************************************************************************************************************************************************
Wednesday 15 May 2019 22:14:42 +0200 (0:00:00.107) 0:00:00.107 *********
ok: [localhost] => {
"changed": false,
"msg": "All assertions passed"
}
[WARNING]: Could not match supplied host pattern, ignoring: bastion
@alexanderkjeldaas
alexanderkjeldaas / Dockerfile
Created May 22, 2018 20:04
ghcjs-8.4 with stack.
FROM ubuntu:16.04
## ensure locale is set during build
ENV LANG C.UTF-8
## Haskell environment
RUN echo 'deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main' > \
/etc/apt/sources.list.d/ghc.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6F88286 && \
apt-get update && \
@alexanderkjeldaas
alexanderkjeldaas / # emacs-mac - 2017-02-23_11-30-53.txt
Created February 23, 2017 11:05
emacs-mac (railwaycat/emacsmacport/emacs-mac) on macOS 10.12.3 - Homebrew build logs
Homebrew build logs for railwaycat/emacsmacport/emacs-mac on macOS 10.12.3
Build date: 2017-02-23 11:30:53
@alexanderkjeldaas
alexanderkjeldaas / # emacs - 2017-02-23_11-56-50.txt
Created February 23, 2017 11:05
emacs on macOS 10.12.3 - Homebrew build logs
Homebrew build logs for emacs on macOS 10.12.3
Build date: 2017-02-23 11:56:50
@alexanderkjeldaas
alexanderkjeldaas / # emacs-mac - 2017-02-23_11-30-53.txt
Created February 23, 2017 11:02
emacs-mac (railwaycat/emacsmacport/emacs-mac) on macOS 10.12.3 - Homebrew build logs
Homebrew build logs for railwaycat/emacsmacport/emacs-mac on macOS 10.12.3
Build date: 2017-02-23 11:30:53