Parman - Activate OP_GFY now!! on Nostr: If you're looking to learn to code for the joy and empowerment, I highly recommend ...
If you're looking to learn to code for the joy and empowerment, I highly recommend bash script.
It helps you to be great at maintaining your computer, and following guides to install things with Linux.
Anything you might execute from the command line is code.
Here's how you start (works on Linux or Mac)...
1) create a paranoid crypto anarchist directory and go into it
cd ~
mkdir pca
cd pca
2) make a file
touch GFY.sh
3) edit it with nano (vim later when you're getting skilled and seeking efficiency). This makes step 2 redundant, everyone relax, I know.
nano GFY.sh
4) on line 1, very important, put...
#!/bin/bash
This turns the document into a program.
5) Let's print something. Add these 3 lines
echo "GFY World!"
sleep 10
clear
This will print to screen, wait 10 seconds, then clear the screen, then the program ends. Notice, each new line is a new command, and they can be sequentially typed in if you want. All these lines of bash code work manually too.
6)
Make the program executable...
sudo chmod +x ~/GFY.sh
This is superuser do (elevated privileges), change mode function, add executable option, and the path to the file (~ is shorthand to the home directory of the current user).
7) now you can run the program like this...
./GFY.sh
Or
~/GFY.sh
In the first example the full stop stands for the current directory. So whatever your directory you're in, the computer knows to replace the full stop with the current path, and then it adds on the rest. You have to be in the same directory as your program for this work.
In the second example, you don't have to be in the same directory because you're specifying the path fully, although in shorthand with ~
This might seem very trivial but it is the basic building blocks for building more and more complex things, such as Parmanode .
You can actually read the Parmanode script and see what it's doing.
Maybe I should do a video one day explaining the code.
Published at
2024-10-22 10:54:38Event JSON
{
"id": "7c13f2d45495d180d17a2f7f5863811e4df50eedb3a2c75672212f610aec9998",
"pubkey": "fad6540c8f2fd2a16a25d0d82dd95d3bad7890d435d1690848a0a77d2883a447",
"created_at": 1729594478,
"kind": 1,
"tags": [],
"content": "If you're looking to learn to code for the joy and empowerment, I highly recommend bash script.\n\nIt helps you to be great at maintaining your computer, and following guides to install things with Linux. \n\nAnything you might execute from the command line is code.\n\nHere's how you start (works on Linux or Mac)...\n\n1) create a paranoid crypto anarchist directory and go into it\n\ncd ~\nmkdir pca\ncd pca\n\n2) make a file\ntouch GFY.sh\n\n3) edit it with nano (vim later when you're getting skilled and seeking efficiency). This makes step 2 redundant, everyone relax, I know. \n\nnano GFY.sh\n\n4) on line 1, very important, put...\n\n#!/bin/bash\n\nThis turns the document into a program. \n\n5) Let's print something. Add these 3 lines\n\necho \"GFY World!\"\nsleep 10\nclear\n\nThis will print to screen, wait 10 seconds, then clear the screen, then the program ends. Notice, each new line is a new command, and they can be sequentially typed in if you want. All these lines of bash code work manually too.\n\n6)\nMake the program executable...\n\nsudo chmod +x ~/GFY.sh\n\nThis is superuser do (elevated privileges), change mode function, add executable option, and the path to the file (~ is shorthand to the home directory of the current user).\n\n7) now you can run the program like this...\n\n./GFY.sh\n\nOr\n\n~/GFY.sh\n\nIn the first example the full stop stands for the current directory. So whatever your directory you're in, the computer knows to replace the full stop with the current path, and then it adds on the rest. You have to be in the same directory as your program for this work.\n\nIn the second example, you don't have to be in the same directory because you're specifying the path fully, although in shorthand with ~\n\nThis might seem very trivial but it is the basic building blocks for building more and more complex things, such as Parmanode .\n\nYou can actually read the Parmanode script and see what it's doing.\n\nMaybe I should do a video one day explaining the code.",
"sig": "4bc9d7f5f250fb149e98f6ad4518f86b1e1db118ed64412eb5aff212052a3149b2aa018a97b7a983348c082694a2441132228b9a07b24d6970c77d87ed0f4991"
}