Skip to content

Instantly share code, notes, and snippets.

View maalos's full-sized avatar
😐
code doesn't work

maalos maalos

😐
code doesn't work
View GitHub Profile
@maalos
maalos / index.html
Last active November 29, 2023 13:19
A useful JavaScript snippet for loading JavaScript files (especially the big ones, slowing down website load times) after the website has loaded, in order specified in scriptsToLoad.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="syncedDeferLoader.js" defer></script>
</head>
<body>
@maalos
maalos / firmware-tool
Last active October 4, 2023 06:09
SImple tool for unpacking and repacking firmware files with automatic squashfs decompression allowing for quick and easy embedded filesystem modifications
#!/usr/bin/env python3
import sys
import os
def usage():
print("Usage: firmware-tool <(u)npack/(p)ack> <binary file/unpacked directory> [output filename]")
exit(0)
if len(sys.argv) < 3:
@maalos
maalos / ddnsfinder.py
Last active September 16, 2023 19:03
Dynamic DNS Domain Lookup Tool
#!/usr/bin/python3
import sys
import requests
import threading
print("Dynamic DNS Domain Lookup Tool\nwritten by maalos\n")
if len(sys.argv) < 2:
print("Wrong argument count, syntax: ./ddnsfinder.py <domain> [port (default 80)]\nExample: ./ddnsfinder.py facebook\n[+] http://facebook.webhop.info\n")
@maalos
maalos / bolt-vehicle-ring-script.py
Created September 8, 2023 19:32
Python script for remotely using the ring feature on any parked and online Bolt vehicle.
import requests
import argparse
import json
def main():
parser = argparse.ArgumentParser(description="Bolt Vehicle Ringer")
# get the needed data using HTTP Toolkit or any other HTTPS proxy, it's being sent as a request header
parser.add_argument("token", help="Account token")
parser.add_argument("id", help="Vehicle ID")
parser.add_argument("lat", help="Latitude")
@maalos
maalos / bolt-api-research-project.md
Created September 8, 2023 12:14
Bolt API Research Project
@maalos
maalos / lfspm
Last active November 29, 2023 13:19
A Linux From Scratch Package Manager that's just a few kilobytes in size and works quite well, with support for make, cmake, perl and meson.
#!/usr/bin/env bash
echo -e "\nLinux From Scratch Package Manager"
[ -z "$1" ] && echo " _ ______ ______________ ___
| | | ___/ ___| ___ \ \/ |
| | | |_ \ \`--.| |_/ / . . |
| | | _| \`--. \ __/| |\/| |
| |____| | /\__/ / | | | | |
\_____/\_| \____/\_| \_| |_/
" && echo -e "Usage: lfspm <add/del/download/install> <package name>\n" && exit
@maalos
maalos / index.html
Last active May 23, 2022 21:08
html template
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Document</title>
<style>
@media (prefers-color-scheme: dark) {
body {color:#fff;background:#000;}
a:link {color:#cdf;}
a:hover, a:visited:hover {color:#def;}
@maalos
maalos / microsnek.html
Last active November 3, 2023 15:45
smallest snake game in js (498 characters)
<canvas id=g width=256 height=256 style="border:solid"><script>[c,j,s,z,h]=[g.getContext("2d"),16,[[8,8]]];a=s[0];onkeydown=({key:e})=>[z,h]={d:[z||1,0],a:[z||-1,0],s:[0,h||1],w:[0,h||-1]}[e];setInterval(()=>{if(s.unshift([s[0][0]+z&15,s[0][1]+h&15]),""+s[0]==a)with(Math)for(r=random(),f=floor(j*r);a=[f,f],s.some(e=>""+e==a););else s.slice(1).some(e=>""+e==s[0])?s.splice(1):s.pop();c.clearRect(0,0,256,256);c.fillRect(j*a[0],j*a[1],j,j);s.forEach(([e,l])=>c.fillRect(j*e,j*l,j,j))},125)</script>

brainfuck snippets

arithmetical

addition

|5|3| → |8|0|
   ^       ^
[<+>-]

subtraction