Skip to content

Instantly share code, notes, and snippets.

View 0x4248's full-sized avatar
:octocat:

0x4248 (Blix) 0x4248

:octocat:
View GitHub Profile
@0x4248
0x4248 / How_I_set_up_my_raspberrypi.md
Created April 28, 2024 14:50
This goes trough how I set up my raspberry pi

How I set up my raspberry pi

First I downloaded the latest version of Raspbian lite from the Raspberry Pi Imager. I then flashed the image to a microSD card using the Raspberry Pi Imager.

I then inserted the microSD card into the Raspberry Pi and powered it on. I connected to the Raspberry Pi using SSH in VS Code which installs the VS Code server on the Raspberry Pi. I then install all of my extensions I would use on my local machine.

Important notes

Trough out this guide I will be using callouts to highlight important information.

@0x4248
0x4248 / build.sh
Created April 27, 2024 14:47
A hello world program in ARM64 Linux
as hello_world.asm -o tmp
ld tmp -o program
./program
@0x4248
0x4248 / tutorial.md
Created January 16, 2024 22:32
Linux from scratch on a M series Mac

Linux from scratch on a M series Mac (LSFMac)

This is a tutorial on how to build linux and test it using qemu on a M series Mac.

Prerequisites

You will need brew, git ,docker, qemu and a Mac with a M series chip (M1, M2, M3 ...)

Install brew from https://brew.sh/ and then install qemu and docker using brew:

@0x4248
0x4248 / tutorial.md
Last active July 20, 2023 14:02
How to test Linux in qemu using busybox

Download linux

Download busybox

cd into linux

run:

make defconfig
make -j 24
{
"name": "App/Project Name",
"version": "0.0.1",
"licence": "www.example.com/licence.txt",
"author": "Author Name",
"git_url": "www.example.com"
}
@0x4248
0x4248 / quick_clone.py
Created June 27, 2023 07:17
Download all non-forked repositories of a user
# Quick Github downloader
# Download all non-forked repositories of a user
# By: Lewis Evans
import os
import requests
username = input("Enter your GitHub username: ")
clone_directory = "./repositories"
@0x4248
0x4248 / lottery.cpp
Created March 25, 2023 09:11
This is a simple lottery simulator that will simulate a lottery game.
/**
* Lottery Simulator
* This is a simple lottery simulator that will simulate a lottery game.
*/
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
@0x4248
0x4248 / quick setup.sh
Created February 18, 2023 17:37
A quick setup script for awesomelewis2007's ideal development environment
echo "Quick setup script for awesomelewis2007's ideal development environment"
sudo apt update
sudo apt install gcc build-essential python3-dev python3-pip nodejs npm fish git micro mc -y
echo "Now changing shell to fish for current user"
sudo chsh -s /usr/bin/fish
cd ~
mkdir code
cd code
@0x4248
0x4248 / Tiktok.py
Created July 13, 2022 15:52
A simulation to show how many videos someone watches on TikTok in one hour
import random
import time
class Values:
video_types = [15,60,180]
hour = 3600
def demo():
input("This is a algorithm to show how many TikTok videos a person can consume (Press enter)")
print("Videos watches if all videos are 15s that are 100% watched:"+str(Values.hour/15))
PS1="┌──[Bash \v]──[\@]──[\e[0;32m\u\e[0m@\e[0;32m\H\e[0;34m \w\e[0m]\n└─>"