This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Dockerfile to build a bootable Debian image for MIPS Magnum platform using GRUB as bootloader | |
| # Steps to build and run: | |
| # mkdir tmpdir && cd tmpdir | |
| # podman build -v $(pwd):/workspace --target build . | |
| # podman build -v $(pwd):/workspace --target grubexe . | |
| # podman build -v $(pwd):/workspace --device /dev/fuse --cap-add SYS_ADMIN --target rootfs . | |
| # podman build -v $(pwd):/workspace --target final . | |
| # qemu-system-mips64el -M magnum -m 128 -net nic -net user -global ds1225y.filename=nvram -bios NTPROM.RAW -hda disk.img | |
| # rootfs may take a while, you can use your host debootstrap to speed it up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| do_install() { | |
| cat <<EOF > /etc/systemd/system/ronginx.service | |
| [Unit] | |
| Description=Read-only filesystem support for Nginx | |
| After=tmp.mount | |
| [Service] | |
| Type=oneshot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PART_NAME="linux" | |
| IMG_NAME="emile.img" | |
| PART_SIZE=$((1024*1024*1000)) | |
| BS=$((1024*1024)) | |
| # HD0-OpenRetroSCSI-7.5.3.hda | |
| # https://mega.nz/folder/8hA3AQCJ#pWUq92L70yDXlogy9lk5Dg/file/hkIxnQ4S | |
| #mv HD0-OpenRetroSCSI-7.5.3.hda MacOS.img | |
| cp MacOS.img "$IMG_NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdbool.h> | |
| #include <stdint.h> | |
| bool is_divisible(uint64_t n, uint64_t divisor) { | |
| while((divisor % 2) == 0) { | |
| if((n % 2)) | |
| return false; | |
| n /= 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example of Bailey–Borwein–Plouffe digit extraction formula | |
| extra = 2 | |
| def BBP_8k(k,j): | |
| return (8*k+j) | |
| def BBP_mod(n, d): | |
| return (16**n) % d | |
| def BBP_inner(n, j): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export TERM=xterm-256color | |
| export COLUMNS=80 | |
| export LINES=40 | |
| DISPLAY= mpv --quiet -vo caca 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' | |
| export TERM=xterm-256color | |
| export COLUMNS=80 | |
| export LINES=40 | |
| yt-dlp -f best https://www.youtube.com/watch?v=dQw4w9WgXcQ -o - 2> /dev/null | ffmpeg -re -i pipe: -vcodec rawvideo -an -color full16 -antialias prefilter -algorithm fstein -pix_fmt rgb24 -window_size 80x40 -driver ncurses -f caca - 2> /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #removed archs | |
| git log --diff-filter=A --oneline --name-only -- arch/ | grep -E "^arch/[^/]?+/Makefile$" | xargs git log --oneline --diff-filter=D --name-only -- | |
| #added arches | |
| git log --diff-filter=A --oneline --name-only -- arch/ | grep -E "^arch/[^/]?+/Makefile$" | xargs git log --oneline --diff-filter=A --name-only -- | |
| #example outoput of removed | |
| : ' | |
| aec499c75cf8 nds32: Remove the architecture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LINUX=$1 | |
| if [ ! -f "init" ]; then | |
| if [ -d "tmps" ]; then | |
| sudo umount tmps | |
| rmdir tmps | |
| fi | |
| dd if=/dev/zero of=init bs=4k count=400 | |
| mkfs.ext4 init | |
| mkdir tmps | |
| sudo mount -o loop init tmps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SSH_PATH=$HOME/.ssh/id_rsa; read -ep "Enter file in which to save the key ($SSH_PATH): " -i $SSH_PATH SSH_PATH && echo "Enter seed passphrase: " && certtool --generate-privkey --outfile $SSH_PATH --key-type=rsa --sec-param=high --seed=$(perl -e '<>' | sha256sum | tr -d '-') && ssh-keygen -yf $SSH_PATH | sed "s/$/ $HOSTNAME/" > $SSH_PATH.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| **/*.log | |
| **/*.o | |
| **/*.d | |
| **/*.so | |
| **/*.a | |
| **/*.bin | |
| **/*.hex | |
| **/*.elf | |
| **/*.axf | |
| **/*.exe |
NewerOlder