Skip to content

Commit 7efc2f9

Browse files
committed
bak
1 parent c8e5596 commit 7efc2f9

File tree

4 files changed

+302
-6
lines changed

4 files changed

+302
-6
lines changed

README.bigb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ I am also generally interested in:
144144
| Illus. Terese Nelsen |
145145
-------------------------------------
146146
``
147-
{title=<ASCII art> of https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=413591[Force of Will] <Magic: The Gathering> card <inscribed (blockchain)> in the <Bitcoin blockchain>}
147+
{title=<ASCII art> of a https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=413591[Force of Will] <Magic: The Gathering> card <inscribed (blockchain)> in the <Bitcoin blockchain>}
148148
{description=Artist unknown, uploaded December 2014. Part of <Cool data embedded in the Bitcoin blockchain>{full} where <Ciro Santilli> maintains a curated list of such interesting inscriptions.
149149

150150
This was a small project done by Ciro for <artistic> purposes that received some attention due to the incredible hype surrounding <cryptocurrencies> at the time. <Ciro Santilli>'s views on <cryptocurrencies> are summarized at: <Are cryptocurrencies useful?>{full}.

aratu-week-2024-talk-by-ciro-santilli.bigb

Lines changed: 299 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
= Aratu Week 2024 Talk by Ciro Santilli: My Best Random Projects
22
{scope}
33

4+
* https://cirosantilli.com/aratu-week-2024-talk-by-ciro-santilli
5+
* https://ourbigbook.com/cirosantilli/aratu-week-2024-talk-by-ciro-santilli
6+
47
\Image[https://raw.githubusercontent.com/cirosantilli/media/master/CIA_Star_Wars_website_promo.jpg]
58
{height=850}
69
{source=https://web.archive.org/web/20101230033220/http://starwarsweb.net/}
@@ -450,6 +453,40 @@ Article: <Ciro's Bitcoin Inscription Museum>{full}
450453
= My obsession: find \b[every] image before ordinals
451454
{parent=Ciro's Bitcoin Inscription Museum}
452455

456+
= Fan tributes
457+
{parent=My obsession: find every image before ordinals}
458+
459+
``
460+
-------------------------------------
461+
| Force of Will 3 U U |
462+
| --------------------------------- |
463+
| | //////////// | |
464+
| | ////() ()\////\ | |
465+
| | ///_\ (--) \///\ | |
466+
| | ) //// \_____///\\ | |
467+
| | ) \ / / / / | |
468+
| | ) / \ | | / _/ | |
469+
| | ) \ ( ( / / / / \ | |
470+
| | / ) ( ) / ( )/( ) \ | |
471+
| | \(_)/(_)/ /UUUU \ \\\/ | | |
472+
| .---------------------------------. |
473+
| Interrupt |
474+
| ,---------------------------------, |
475+
| | You may pay 1 life and remove a | |
476+
| | blue card in your hand from the | |
477+
| | game instead of paying Force of | |
478+
| | Will's casting cost. Effects | |
479+
| | that prevent or redirect damage | |
480+
| | cannot be used to counter this | |
481+
| | loss of life. | |
482+
| | Counter target spell. | |
483+
| `---------------------------------` |
484+
| l
485+
| Illus. Terese Nelsen |
486+
-------------------------------------
487+
``
488+
{title=<ASCII art> of a https://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=413591[Force of Will] <Magic: The Gathering> card <inscribed (blockchain)> in the <Bitcoin blockchain>}
489+
453490
= Social media
454491
{parent=My obsession: find every image before ordinals}
455492

@@ -604,7 +641,7 @@ Removing the `@` signs:
604641
\Image[https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/GitHub_collateral_freedom.jpg]
605642
{height=800}
606643

607-
= The issue tracker is quite cute, because Chinese people actually use GitHub search in addition to search engines
644+
= The GitHub issue tracker is quite cute, because Chinese people actually use GitHub search in addition to search engines
608645
{parent=China dictatorship}
609646

610647
https://github.com/cirosantilli/china-dictatorship/issues
@@ -613,17 +650,276 @@ https://github.com/cirosantilli/china-dictatorship/issues
613650
{height=2000}
614651
{source=https://github.com/cirosantilli/china-dictatorship/issues}
615652

653+
= Stack Overflow attacks
654+
{parent=China dictatorship}
655+
656+
\Image[https://upload.wikimedia.org/wikipedia/commons/0/02/Stack_Overflow_logo.svg]
657+
{height=200}
658+
659+
https://web.archive.org/web/20210917212322/https://stackoverflow.com/questions/6121094/how-do-i-run-a-program-with-commandline-arguments-using-gdb-within-a-bash-script/6121299
660+
661+
\Image[https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/Stack_Overflow_keyword_attack_by_Ciro_Santilli.png]
662+
{height=1660}
663+
664+
= Package managers
665+
{parent=China dictatorship}
666+
667+
= PyPi: the cowards took it down
668+
{parent=Package managers}
669+
670+
Up March 2023 https://web.archive.org/web/20230306090740/https://pypi.org/project/china-dictatorship/
671+
672+
\Image[https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/pypi.org_project_china-dictatorship.png]
673+
{height=1900}
674+
675+
Down November 2023 http://web.archive.org/web/20231110041847/https://pypi.org/project/china-dictatorship/
676+
677+
\Image[https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/pypi.org_project_china-dictatorship_down.png]
678+
{height=916}
679+
680+
= Wall of pride and shame
681+
{parent=China dictatorship}
682+
683+
|| Site
684+
|| Logo
685+
|| Pride or shame
686+
|| Sample
687+
|| Comments
688+
689+
| GitHub
690+
| \Image[https://upload.wikimedia.org/wikipedia/commons/c/c2/GitHub_Invertocat_Logo.svg]{height=300}
691+
| \Image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
692+
| https://github.com/cirosantilli/china-dictatorship
693+
| Exemplary. Never let me down. Has a public per-country takedown list: https://github.com/github/gov-takedowns/tree/master/China
694+
695+
| Stack Overflow
696+
| \Image[https://upload.wikimedia.org/wikipedia/commons/e/ef/Stack_Overflow_icon.svg]{height=300}
697+
| \Image[https://web.archive.org/web/20230609155744im_/https://preview.redd.it/15l6tpf1dqd31.jpg?width=836&auto=webp&v=enabled&s=2b2f3b9f0ae40826858e0f3908f621ff86d62520]{height=300}
698+
| https://stackoverflow.com/users/895245/ciro-santilli-ourbigbook-com
699+
| Elected mods refuse to say what is allowed or not, you have to fight and infer from meta threads: https://meta.stackexchange.com/questions/366163/can-i-use-images-such-as-from-tiananmen-square-protests-to-criticise-the-chinese[]. But generally shaming anything the West does not like is OK.
700+
616701
= Linux Kernel Module Cheat
617702
{parent=Aratu Week 2024 Talk by Ciro Santilli}
618703

619704
https://github.com/cirosantilli/linux-kernel-module-cheat
620705

621-
= Run \b[one] command, get a Linux terminal on QEMU
706+
= Get a Linux terminal on QEMU
622707
{parent=Linux Kernel Module Cheat}
623708

624-
= \b[Everything] is built from source and easily modifiable
709+
\Image[https://upload.wikimedia.org/wikipedia/commons/4/45/Qemu_logo.svg]
710+
711+
One time setup:
712+
``
713+
git clone https://github.com/cirosantilli/linux-kernel-module-cheat
714+
cd linux-kernel-module-cheat
715+
sudo apt install docker
716+
python3 -m venv .venv
717+
. .venv/bin/activate
718+
./setup
719+
./run-docker create
720+
./run-docker sh
721+
``
722+
723+
You are now in Docker.
724+
725+
Build everything from source inside docker:
726+
``
727+
./build --download-dependencies qemu-buildroot
728+
``
729+
730+
Boot Linux and get a userland shell:
731+
``
732+
./run
733+
``
734+
735+
Outcome:
736+
``
737+
<6>[ 1.383114] NET: Registered protocol family 17
738+
<6>[ 1.383682] 9pnet: Installing 9P2000 support
739+
<6>[ 1.385473] IPI shorthand broadcast: enabled
740+
<6>[ 1.385701] sched_clock: Marking stable (1355697980, 27047205)->(1385555667, -2810482)
741+
<6>[ 1.387744] ALSA device list:
742+
<6>[ 1.387843] No soundcards found.
743+
<6>[ 1.535981] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
744+
<5>[ 1.543470] scsi 1:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
745+
<6>[ 1.548952] EXT4-fs (vda): mounting ext2 file system using the ext4 subsystem
746+
<6>[ 1.555909] EXT4-fs (vda): mounted filesystem without journal. Opts: (null)
747+
<6>[ 1.556145] VFS: Mounted root (ext2 filesystem) on device 254:0.
748+
<6>[ 1.557451] devtmpfs: mounted
749+
<6>[ 1.605639] Freeing unused kernel image (initmem) memory: 1248K
750+
<6>[ 1.605875] Write protecting the kernel read-only data: 16384k
751+
<6>[ 1.607977] Freeing unused kernel image (text/rodata gap) memory: 2044K
752+
<6>[ 1.610190] Freeing unused kernel image (rodata/data gap) memory: 1012K
753+
<6>[ 1.610495] Run /sbin/init as init process
754+
<6>[ 1.683311] tsc: Refined TSC clocksource calibration: 3293.671 MHz
755+
<6>[ 1.683618] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2f79f177aae, max_idle_ns: 440795226653 ns
756+
<6>[ 1.683849] clocksource: Switched to clocksource tsc
757+
<3>[ 1.694241] 9pnet_virtio: no channels available for device host_data
758+
mount: mounting host_data on /mnt/9p/data failed: No such file or directory
759+
qemu-system-x86_64: warning: 9p: degraded performance: a reasonable high msize should be chosen on client/guest side (chosen msize is <= 8192). See https://wiki.qemu.org/Documentation/9pset.
760+
<3>[ 1.712287] overlayfs: overlapping upperdir path
761+
mount: mounting overlay on /mnt/overlay failed: Too many levels of symbolic links
762+
hello S98
763+
hello .profile
764+
/lkmc
765+
root@buildroot# pwd
766+
/lkmc
767+
/lkmc
768+
root@buildroot#
769+
``
770+
771+
= \b[Everything] is built from source and easily modifiable, powered by Buildroot
625772
{parent=Linux Kernel Module Cheat}
626773

774+
\Image[https://web.archive.org/web/20240424065053im_/https://bootlin.com/wp-content/uploads/2015/05/logo-buildroot.png]
775+
776+
The following are https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/submodules[stored in submodules]:
777+
``
778+
submodules/binutils-gdb/
779+
submodules/buildroot/
780+
submodules/gcc/
781+
submodules/glibc/
782+
submodules/linux/
783+
submodules/qemu/
784+
``
785+
786+
So you can modify source, rebuild and that's it, its in the VM.
787+
788+
E.g., let's hack the linux kernel:
789+
790+
``
791+
asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
792+
{
793+
pr_info("I'VE HACKED THE LINUX KERNEL!!!");
794+
``
795+
796+
Rebuild Linux:
797+
798+
``
799+
./build-linux
800+
``
801+
802+
Rerun:
803+
804+
``
805+
./run
806+
``
807+
808+
And after boot we see:
809+
810+
``
811+
<6>[ 0.000000] I'VE HACKED THE LINUX KERNEL!!!
812+
``
813+
814+
= Kernel GDB step debugging just works
815+
{parent=Linux Kernel Module Cheat}
816+
817+
Start QEMU and wait for GDB:
818+
``
819+
./run --gdb-wait
820+
``
821+
822+
Connect GDB to QEMU and run up to a symbol that shows up at boot:
823+
``
824+
./run-gdb start_kernel
825+
``
826+
827+
Outcome:
828+
``
829+
``
830+
831+
= Multiple architectures supported
832+
{parent=Linux Kernel Module Cheat}
833+
834+
E.g., if you want aarch64:
835+
836+
``
837+
./build -aA
838+
./run -aA
839+
``
840+
841+
That's it.
842+
843+
= Lots of in-tree examples
844+
{parent=Linux Kernel Module Cheat}
845+
846+
= Kernel modules
847+
{parent=Lots of in-tree examples}
848+
849+
https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/kernel_modules/hello.c[kernel_modules/hello.c]
850+
851+
``
852+
#include <linux/module.h>
853+
#include <linux/kernel.h>
854+
855+
static int myinit(void)
856+
{
857+
pr_info("hello init\n");
858+
/* 0 for success, any negative value means failure,
859+
* E* consts if you want to specify failure cause.
860+
* https://www.linux.com/learn/kernel-newbie-corner-loadable-kernel-modules-coming-and-going */
861+
return 0;
862+
}
863+
864+
static void myexit(void)
865+
{
866+
pr_info("hello exit\n");
867+
}
868+
869+
module_init(myinit)
870+
module_exit(myexit)
871+
MODULE_LICENSE("GPL");
872+
``
873+
874+
= Assembly
875+
{parent=Lots of in-tree examples}
876+
877+
Assertions! The best way to learn assembly.
878+
879+
https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/userland/arch/x86_64/add.S[userland/arch/x86_64/add.S]
880+
881+
``
882+
#include <lkmc.h>
883+
884+
LKMC_PROLOGUE
885+
/* Register immediate. */
886+
mov $1, %rax
887+
add $2, %rax
888+
LKMC_ASSERT_EQ(%rax, $3)
889+
LKMC_EPILOGUE
890+
``
891+
892+
= Bare metal!
893+
{parent=Lots of in-tree examples}
894+
895+
Powered by crosstool-NG:
896+
897+
https://github.com/cirosantilli/linux-kernel-module-cheat/blob/master/baremetal/arch/aarch64/semihost_exit.S[baremetal/arch/aarch64/semihost_exit.S]
898+
899+
``
900+
.global main
901+
main:
902+
/* 0x20026 == ADP_Stopped_ApplicationExit */
903+
mov x1, 0x26
904+
movk x1, 2, lsl 16
905+
str x1, [sp, 0]
906+
907+
/* Exit status code. Host QEMU process exits with that status. */
908+
mov x0, 0
909+
str x0, [sp, 8]
910+
911+
/* x1 contains the address of parameter block.
912+
* Any memory address could be used.
913+
*/
914+
mov x1, sp
915+
916+
/* SYS_EXIT */
917+
mov w0, 0x18
918+
919+
/* Do the semihosting call on A64. */
920+
hlt 0xf000
921+
``
922+
627923
= All GitHub commit emails
628924
{parent=Aratu Week 2024 Talk by Ciro Santilli}
629925
{tag=/All GitHub commit emails}

computer.bigb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Much more useful than instruments used in inferior arts, such as pianos or paint
77

88
Unlike other humans, computers are mindless slaves that do exactly what they are told to, except for https://www.youtube.com/watch?v=aNzTUdOHm9A[occasional cosmic ray bit flips]. Until they <artificial general intelligence>[take over the world that is].
99

10-
\Video[https://www.youtube.com/watch?v=rTRzYjoZhIY]
10+
\Video[https://www.youtube.com/watch?v=KmuP8gsgWb8]
1111
{title=A <computer> is the equivalent of a bicycle for our minds by <Steve Jobs> (1980)}
1212
{description=Likely an excerpt from an interview done for a documentary in 1980. TODO exact source.}
1313

react.bigb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ and then the new comment easily gets the callback attached to it.
2626

2727
And it also ends up naturally doubling as a template engine.
2828

29-
But React can also be extremelly hard to use. It can be very hard to know what you can and cannot do sometimes, then you have to stop and try to understand how react works things better:
29+
But React can also be extremely hard to use. It can be very hard to know what you can and cannot do sometimes, then you have to stop and try to understand how react works things better:
3030
* <cannot update a component while rendering a different component warning in React>
3131
* Rendered more hooks than during the previous render.
3232
* cannot use hooks from helpers:

0 commit comments

Comments
 (0)