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 / keybase.md
Created September 9, 2020 07:29
keybase.md

Keybase proof

I hereby claim:

  • I am algorythm on github.
  • I am wiberg (https://keybase.io/wiberg) on keybase.
  • I have a public key ASD46EvtNkCCtaKSQSfEUayBqqYnbzK-g__01wDwpxGwrwo

To claim this, I am signing this object:

@algorythm
algorythm / General Unix Tips.md
Last active May 25, 2021 14:59
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:

// ...
var userTask = _context.Users
.ByUserId(userId)
.FirstOrDefaultAsync();
var postTask = _context.SocialFeedPosts
.ByPostId(postId)
.FirstOrDefaultAsync();
await Task.WhenAll(userTask, postTask);
@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:

@algorythm
algorythm / client.py
Last active December 15, 2018 17:18
OAuth Client
from http.server import BaseHTTPRequestHandler, HTTPServer
import webbrowser
def get_code_from_httpserver(address = "127.0.0.1", port = 8000):
"""
Starts a webserver
When a GET request with query parameter "?code=something" is
received, stop the webserver and return that code
"""
@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 / recon.md
Last active March 28, 2018 07:54
Tips for CTF

CTF tips

Recon the server

It is a good idea to start a port scan on the server. A very basic fast way is:

nmap -sS <ip/fqdn>
public static void SleepSort(int[] list)
{
foreach (var i in list)
{
Task.Run(() =>
{
Thread.Sleep(i);
Console.Write($"{i} ");
});
}
@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