Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Kjeldaas alexanderkjeldaas

  • Founder of a startup
  • Scandinavia
View GitHub Profile
View keybase.md

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
View performance.cc
// 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 Apr 16, 2021 — 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
View hetzner-cloud-wipe-and-install-nixos.sh
#!/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 Mar 29, 2021
Setup k3s on Hetzner with CSI drivers
View setup-k3s-on-hetzner.sh
#!/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
View out.txt
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
ghcjs-8.4 with stack.
View Dockerfile
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 Feb 23, 2017
emacs-mac (railwaycat/emacsmacport/emacs-mac) on macOS 10.12.3 - Homebrew build logs
View # emacs-mac - 2017-02-23_11-30-53.txt
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 Feb 23, 2017
emacs on macOS 10.12.3 - Homebrew build logs
View # emacs - 2017-02-23_11-56-50.txt
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 Feb 23, 2017
emacs-mac (railwaycat/emacsmacport/emacs-mac) on macOS 10.12.3 - Homebrew build logs
View # emacs-mac - 2017-02-23_11-30-53.txt
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 Feb 23, 2017
emacs on macOS 10.12.3 - Homebrew build logs
View # emacs - 2017-02-23_11-56-50.txt
Homebrew build logs for emacs on macOS 10.12.3
Build date: 2017-02-23 11:56:50