Skip to content

Instantly share code, notes, and snippets.

View algorythm's full-sized avatar
💭
Stuff and things

Anders Wiberg Olsen algorythm

💭
Stuff and things
View GitHub Profile
@algorythm
algorythm / General Unix Tips.md
Last active June 10, 2025 08:08
UNIX Tips and Tricks

Introduction

This Gist contains a few tips and tricks that I've gathered over time to optimize my experience when working on unix based systems. Some of the things mentioned in this document, will explained in further detail below. This file will contain things in a more compact manner.

General Networking

Ping

Ping though a specific NIC:

@algorythm
algorythm / network-setup.md
Created March 21, 2019 12:12
Configure network on Ubuntu 18.04

Find the default network configuration file:

$ ls /etc/netplan/
50-cloud-init.yaml

Check the contents of the file:

@MorphyDK
MorphyDK / Install.sh
Last active August 17, 2022 12:23
Reinstall script of your own Ubuntu server (Own passwds etc are needed to adjust the script for your needs)
#!/bin/bash
### Set UserName
echo "Ready to start"
read -rp 'UserName: ' uservar
echo "$uservar added"
#adduser $uservar && echo -e "$userPass\n$userPass\n" | passwd $uservar > /dev/null 2>&1 && echo " User account has been created." || echo " ERR -- User acount creation failed!"
adduser $uservar
usermod -aG sudo $uservar
USER=$uservar
@algorythm
algorythm / create_cd.sh
Created November 28, 2018 16:45
Automate all the things
#!/bin/bash
# Call this file with `bash ./project-create.sh project-name [service-name]`
# - project-name is mandatory
# - service-name is optional
# This will creates 4 directories and a git `post-receive` hook.
# The 4 directories are:
# - $GIT: a git repo
# - $TMP: a temporary directory for deployment
@algorythm
algorythm / Encrypted Installation.md
Last active June 6, 2018 00:26
Secure Arch Linux Installation

Secure Arch Linux Install

Following this guide from YouTube: https://www.youtube.com/watch?v=gB1N00wj3bw

This installation procedure follows installing a secure encrypted lvm version of Arch Linux on my MacBook Pro in Parallels.

Harddisk Setup

Let us start by looking at the naming of harddrives:

@algorythm
algorythm / Setup GPG.md
Last active February 20, 2020 14:29
Useful Git Tips

Setup GPG Key

Install latest GPG version (the one MacOS ships with is out of date):

$ brew install gpg2 gnupg pinentry-mac

Create a new GPG key

@algorythm
algorythm / Setup Secure Linux.md
Last active May 1, 2019 20:22
Configure New Raspberry Pi

Configuring a secure Linux Server (i.e. Raspberry Pi)

This guide will configure a simple secured linux server. In this example, I will configure a raspberry pi.

Prepare SD Card from Mac OS X

This section is for preparing an SD card with Raspbian from a Mac. Start by opening a terminal. Start by downloading the latest version of raspbian:

curl -O -J -L https://downloads.raspberrypi.org/raspbian_lite_latest