Skip to content

Instantly share code, notes, and snippets.

View mikilian's full-sized avatar
🏠
Working from home

Michael mikilian

🏠
Working from home
View GitHub Profile
@mikilian
mikilian / debian_install_php7.sh
Created July 26, 2016 20:43
Installation script to install php7 on a debian based server
#!/bin/bash
clear
# clone the repository
# (c)kasparsd
git clone https://github.com/kasparsd/php-7-debian.git
cd php-7-debian
# build dependencies and install them
./build.sh
@mikilian
mikilian / ubuntu.sh
Last active December 29, 2020 01:39
A setup for ubuntu servers
#!/usr/bin/env bash
set -e
printf -- "#########################################\n"
printf -- "# This script has only been tested with #\n"
printf -- "# Ubuntu 20.04 #\n"
printf -- "# It might work with other versions #\n"
printf -- "#########################################\n\n"
###################################################################################
@mikilian
mikilian / reflect-metadata.ts
Last active May 16, 2020 21:27
reflect-metadata.ts 4.1.2 for deno
/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
@mikilian
mikilian / arch-linux-uefi.md
Last active July 23, 2020 13:01
Arch Linux UEFI setup (64 Bit)

Arch Linus UEFI setup

Since I live in germany, I set my time zone and keyboard layout to it. This does not apply to the system language!

Preconfigure

I am writing this guide while installing Arch in a virtual machine. Therefore my hard disk is /dev/sda and the hostname arch-vm.

@mikilian
mikilian / tcp_client.js
Created September 29, 2020 18:53
node.js TCP client/server example
const { Socket } = require("net");
const tcpClient = (address, port, data) =>
new Promise((resolve, reject) => {
const client = new Socket();
client.connect({ port, address });
client.on("connect", () => {
client.write(Buffer.from(
@mikilian
mikilian / arch-linux-install.md
Last active August 10, 2022 20:19 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks

Install Arch Linux with encrypted file-system and UEFI

The official installation guide contains a more verbose description.

Prepare your bootable USB-drive

  1. Download the .iso image from https://www.archlinux.org/
  2. Verify the signature
  3. Backup your data!
  4. Copy the .iso to a USB-drive
@mikilian
mikilian / 0-arch-after-boot.sh
Created June 27, 2021 20:28
Minimal automatic installation for arch linux on an UEFI system with full encryption using dm-crypt and luks
#!/usr/bin/env bash
SETUP_KEYMAP='de-latin1'
SETUP_DEVICE='/dev/nvme0n1'
SETUP_WIFI=''
SETUP_AMD=''
printf -- "[+] wifi support (N, y): "
read SCRIPT_INPUT
@mikilian
mikilian / CMakeLists.txt
Created June 29, 2021 21:27
Modern C++ development with alpine linux, cmake, clang inside a docker container
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)
cmake_minimum_required(VERSION 3.18)
set(APP_NAME "example-app")
project("${APP_NAME}")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++20 -Wno-multichar")