Skip to content

Instantly share code, notes, and snippets.

@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];