Skip to content

Instantly share code, notes, and snippets.

@0x4248
0x4248 / app-senecalearning-noanim.js
Last active November 14, 2024 10:13
Prevent seneca from showing slow animations which can slow down productivity
setInterval(() => {
document.querySelectorAll("*").forEach(el => {
el.style.animation = "none";
el.style.transition = "none";
el.style.opacity = 1; // just incase an element is hidden
});
}, 200);
@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:

{
"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└─>"
@0x4248
0x4248 / index.html
Last active April 25, 2022 18:47
opacity animator in J (minifiled)
<script src="https://gist.github.com/awesomelewis2007/4ac3ea55bfae27f68adfadf6c6d1969d" async defer></script>