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:
I hereby claim:
To claim this, I am signing this object:
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.
Ping though a specific NIC:
// ... | |
var userTask = _context.Users | |
.ByUserId(userId) | |
.FirstOrDefaultAsync(); | |
var postTask = _context.SocialFeedPosts | |
.ByPostId(postId) | |
.FirstOrDefaultAsync(); | |
await Task.WhenAll(userTask, postTask); |
Find the default network configuration file:
$ ls /etc/netplan/
50-cloud-init.yaml
Check the contents of the file:
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 | |
""" |
#!/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 |
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.
Let us start by looking at the naming of harddrives:
public static void SleepSort(int[] list) | |
{ | |
foreach (var i in list) | |
{ | |
Task.Run(() => | |
{ | |
Thread.Sleep(i); | |
Console.Write($"{i} "); | |
}); | |
} |