Skip to content

Instantly share code, notes, and snippets.

@0xMurage
0xMurage / readme.md
Last active August 28, 2024 18:51
Setting up new ubuntu desktop.
  1. Install brave browser
sudo apt install curl



sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
@0xMurage
0xMurage / .0instructions.md
Last active August 2, 2024 13:52
Issuing TLS Certificates on Traefik Using Let's Encrypt Pebble ACME Test Server

Issuing TLS Certificates on Traefik Using Let's Encrypt Pebble ACME Test Server

Prerequisites

  • Docker with the Docker Compose plugin

Steps

  1. Download the following files:
  • .env which is a sample environment file. The file is named .env so the docker compose can read it automagically for interpolation of variables in compose yaml files.
@0xMurage
0xMurage / one.md
Created May 26, 2024 16:40
GPG notes
1. To list available public keys
gpg -k --keyid-format long
2. To List the available secret keys
gpg -K --keyid-format long
@0xMurage
0xMurage / readme.md
Created January 20, 2024 11:19
Install Podman on Ubuntu 18 +

Only the following Ubuntu versions are supported using this method:

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 21.04
  • Ubuntu 21.10
  • Ubuntu 22.04

I assume all the commands will run in a sudo/privileged shell.

Requirements

'''
Function takes an array of ints as parameter.
Returns True if the sequence.. 1, 3, 4 .. appears in the array somewhere.
'''
def sequenceMatches(arrayOfNumbers):
for index in range(len(arrayOfNumbers)-2):
if arrayOfNumbers[index] == 1 and arrayOfNumbers[index+1] == 2 and arrayOfNumbers[index+2] == 3:
return True
@0xMurage
0xMurage / bus.cpp
Created January 27, 2017 14:11
A C bus company program demo
#include "stdio.h"
int
buses[30], revenue[30],
collections[30], fuel_collections[30],
total_buses=0, total_workers, total_income=0,
total_fuel=0, profit, salary, distance [50],
choice, routes;
char location[50], regist[50], name[50], number_plate[30];