summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaster4385 <blaster4385@tablaster.dev>2024-04-23 01:35:19 +0530
committerBlaster4385 <blaster4385@tablaster.dev>2024-04-23 23:14:40 +0530
commitc6d1352f826d364ffdb5b596fe4b40214f02baf7 (patch)
treeb01cf04b59d28b67c12d1982d02115b90ffefce2
parent02e8dfdfb1f5aaaa8eea16c5b8e3df98f5f24968 (diff)
feat: added more blogs
-rw-r--r--assets/md/bash-scripting-101.md215
-rw-r--r--assets/md/home.md2
-rw-r--r--assets/md/javascript-the-unrivaled-titan-of-the-web-development-realm.md53
3 files changed, 270 insertions, 0 deletions
diff --git a/assets/md/bash-scripting-101.md b/assets/md/bash-scripting-101.md
new file mode 100644
index 0000000..20828f6
--- /dev/null
+++ b/assets/md/bash-scripting-101.md
@@ -0,0 +1,215 @@
+# Bash Scripting 101: Your Shitty Guide to Command Line Magic
+
+Hey there, welcome to the wild world of bash scripting! If you're itching to automate your shitty tasks or just want to impress your friends with your shitty command line skills, you're in the right place. In this shitty guide, we're gonna dive into bash scripting from the ground up, no fancy jargon, just good ol' shitty scripting fun.
+
+## Let's Get Started: No Rocket Science Here
+
+Got you! It's all rocket science here. Grab your favorite text editor and open up your terminal. Whether you're into Vim, Emacs, or even Notepad, it's all good (God knows Vim is the best but even god can't help idiots right?). Create a new file and give it a `.sh` extension. This tells your system it's a bash script.
+
+```bash
+touch hello.sh
+chmod +x hello.sh
+```
+
+Full disclosure: You can save yourself a shit ton of time by not giving extensions to files but then again when were you ever able to remember even the name of the file you created let alone it's type?
+
+Now, let's write a script that says "Hello, World!" because, well, tradition.
+
+```bash
+#!/bin/bash
+echo "Hello, World!"
+```
+
+You could write "Hello \<insert name of partner here\>" but let's be honest, if you're here, reading this, even god knows you're dying alone.
+
+Save it, make it executable with that `chmod +x` command, and give it a spin:
+
+```bash
+./hello.sh
+```
+
+Ta-da! You just ran your first bash script. Boring stuff, right? It gets better. It gets way better. (It doesn't)
+
+## Now, Let's Break It Down: The Basics
+
+Bash scripts are just a series of commands written in, you guessed it, bash. Let's go over the basics without all the technical mumbo jumbo. I know all of it went over your head but I assure you, it's totally not worth it. Seriously, if you don't already know this stuff, you probably don't need it. But anyways, let's get on with it.
+
+### Shebang: The Starting Line
+
+And so the race begins. You aren't gonna win this one but you already knew that right? That `#!/bin/bash` at the top of your shitty script tells your system what the fuck to use in order to understand your shitty code. It's like saying, "Hey, this is a bash script!". Now, you could skip shebangs and just use `bash` to run your shitty script, but come morning, you won't even remember what your shitty code does let alone what it runs with.
+
+### Comments: Because Talking to Yourself is Cool
+
+No, talking to yourself is retarded (s/retarded/what\ every\ developer\ does\ at\ 1\ a\\.m\\.\ at\ night/g). Whoever says otherwise doesn't need to be reading this and can leave. Use `#` to add your shitty comments to your shitty script.
+
+```bash
+#!/bin/bash
+# This is a comment
+echo "Hello, World!" # This is also a comment
+```
+
+It's like leaving sticky notes for yourself so you don't forget what your script does. How many times do I have to say it? You won't remember any of it.
+
+### Variables: Your Script's Memory
+
+Variables are like little memory boxes. You give 'em a name and stuff 'em with data. Unlike your brain.
+
+```bash
+#!/bin/bash
+name="John"
+echo "Hello, $name"
+```
+
+Easy, right? Now `$name` thinks it's John. Don't worry, it'll get over it. Unlike you with your non-existing ex.
+
+### Control Structures: Keeping It in Check
+
+Control structures like `if` statements and loops help your shitty script make decisions and do stuff repeatedly. God knows you can't do stuff properly once. How the fuck will you do it repeatedly? Better to let the pros handle it.
+
+#### Conditional Statements: Making Choices
+
+```bash
+#!/bin/bash
+age=18
+if [ "$age" -ge 18 ]; then
+ echo "You are an adult."
+else
+ echo "You are a minor."
+fi
+```
+
+See? Your shitty script can now tell if you're an adult or a kid. Neat, huh? Doesn't matter because if you're reading this, you'll always be a kid and please for the sake of all that is holy, never grow up. It isn't worth it.
+
+#### Loops: Doing Things Over and Over
+
+```bash
+#!/bin/bash
+for i in {1..5}; do
+ echo "Count: $i"
+done
+```
+
+This loop counts from 1 to 5 and says "Count: x" each time. Simple and effective. As I said, let the pros handle it. You could never do something simply or effectively.
+
+### Functions: Script's Little Helpers
+
+Functions let you group commands together so you can reuse 'em later. Think of them as your shitty script's shitty sidekicks. Not that your script is a superhero. Don't think that highly of the quality of your shitty code.
+
+```bash
+#!/bin/bash
+greet() {
+ echo "Hello, $1!"
+}
+greet "Alice"
+```
+
+Your shitty script just greeted Alice. How thoughtful! When will you meet your "Alice"? That's right! Never.
+
+## Advanced Tricks: Scripting Magic
+
+Now that you've got the basics down, let's step it up a notch with some fancy tricks. It's getting better right? If you think so, please leave.
+
+### Command Substitution: The Magical Swap
+
+```bash
+#!/bin/bash
+files_count=$(ls -l | wc -l)
+echo "Total number of files: $files_count"
+```
+
+Your shitty script just counted the files in the current directory. Pretty cool, huh? Wait a sec... What the fuck is "ls" or "wc"? IDK. Go google it.
+
+### Conditional Expressions: The Mind Reader
+
+```bash
+#!/bin/bash
+# Arithmetic comparison
+if (( 5 > 3 )); then
+ echo "5 is greater than 3"
+fi
+
+# String comparison
+str1="hello"
+str2="world"
+if [[ "$str1" == "$str2" ]]; then
+ echo "Strings are equal"
+else
+ echo "Strings are not equal"
+fi
+
+# File test
+if [[ -f "myfile.txt" ]]; then
+ echo "File exists"
+fi
+```
+
+Your shitty script just became a mind reader, checking numbers, strings, and files like a pro. Please don't try this in real life. You can't read your own mind and you definitely can't read the mind of others.
+
+### Error Handling: Keeping It Cool
+
+```bash
+#!/bin/bash
+set -e # Exit on error
+set -u # Treat unset variables as errors
+
+# Example script that may encounter errors
+missing_file="nonexistent.txt"
+cat "$missing_file"
+echo "This line will not be executed"
+```
+
+With error handling, your shitty script knows when to gracefully bow out instead of causing a scene because god knows your shitty code is filled with errors.
+
+### Input and Output Redirection: Scripting Traffic Control
+
+```bash
+#!/bin/bash
+# Redirecting output to a file
+echo "Hello, World!" > output.txt
+
+# Appending output to a file
+echo "Appending text" >> output.txt
+
+# Redirecting input from a file
+while read line; do
+ echo "Line: $line"
+done < input.txt
+```
+
+Your shitty script just became the traffic cop of input and output streams, directing them wherever it pleases. You're still telling it where to direct them so it's as good a cop as you are. Good luck doing anything useful with this.
+
+### Advanced String Manipulation: Scripting Origami
+
+```bash
+#!/bin/bash
+# Substring extraction
+string="Hello, World!"
+echo "${string:7:5}" # Extracts "World"
+
+# Pattern matching
+if [[ "$string" == *"World"* ]]; then
+ echo "String contains 'World'"
+fi
+
+# Case modification
+uppercase_string="${string^^}"
+echo "Uppercase: $uppercase_string"
+```
+
+Your shitty script is now a black belt in string-fu, slicing, dicing, and transforming strings like a ninja. Yes, it takes a literal ninja to handle the monstrosity that your shitty code is.
+
+## Best Practices: Scripting Etiquette
+
+As you venture further into the scripting world, keep these tips in mind:
+
+- Use meaningful variable names. foo1, foo2 doesn't make any fucking sense, but well, what does make sense?
+- Keep your code tidy with proper indentation. We all know you ain't doing shit. Move on.
+- Handle errors gracefully. Even though there's nothing graceful about your shitty coding practices.
+- Break down complex shitty scripts into smaller shitty functions. Ever ate an entire burger in a single bite? No right?
+- Document your shitty code like you're writing a love letter. Because honest to god, you ain't finding someone IRL to write a love letter to.
+
+## You're Now a Scripting Rockstar
+
+Well, congrats! You've made it this far. What's next? IDk. Do whatever the fuck you want. What do I care?. Good luck writing shitty scripts to do your shitty tasks.
+
+Happy Shitting! \ No newline at end of file
diff --git a/assets/md/home.md b/assets/md/home.md
index f170045..d80acea 100644
--- a/assets/md/home.md
+++ b/assets/md/home.md
@@ -5,6 +5,8 @@ Hey folks, I'm Venkatesh Chaturvedi, currently working as an Associate Support E
## $ ls blogs/
- **[git-101](/git-101)**
+- **[JavaScript: The Unrivaled Titan of the Web Development Realm](/javascript-the-unrivaled-titan-of-the-web-development-realm)**
+- **[Bash Scripting 101](/bash-scripting-101)**
## $ ls projects/
diff --git a/assets/md/javascript-the-unrivaled-titan-of-the-web-development-realm.md b/assets/md/javascript-the-unrivaled-titan-of-the-web-development-realm.md
new file mode 100644
index 0000000..58f03f2
--- /dev/null
+++ b/assets/md/javascript-the-unrivaled-titan-of-the-web-development-realm.md
@@ -0,0 +1,53 @@
+# JavaScript: The Unrivaled Titan of the Web Development Realm
+
+Greetings, fellow denizens of the digital domain! Today, we embark on a grand odyssey to reaffirm our unwavering allegiance to the venerable JavaScript, the titan upon whose shoulders the internet stands. Prepare yourselves for a raucous romp through the realm of coding, as we gleefully eviscerate the pretenders to the throne, most notably TypeScript, in our quest to extol the virtues of pure, unadulterated JavaScript. Without further ado, let the festivities commence!
+
+## Type Safety: Shackles of the Mundane
+
+Type safety, they say, is the hallmark of civilized coding practices. But who among us yearns for such banalities? JavaScript, with its laissez-faire attitude towards typing, allows our variables to roam free, unencumbered by the chains of static constraints. Embrace the chaos, my compatriots! Revel in the unpredictability that only JavaScript can bestow upon us.
+
+## Complexity: A Game for Lesser Mortals
+
+Behold, TypeScript, with its promises of clarity and orderliness! But where others see structure, we see confinement. JavaScript, in its raw and untamed form, is a symphony of complexity, a labyrinthine maze of possibilities. Why shackle ourselves to the constraints of TypeScript when we can dance freely in the maelstrom of JavaScript's boundless potential?
+
+## Type Coercion Errors: A Symphony of Serendipity
+
+Ah, the sweet serenade of type coercion errors! Like a siren's song, they beckon us into the abyss of uncertainty. TypeScript may shield us from their dulcet tones, but at what cost? Embrace the fickle whims of JavaScript, my friends, and bask in the delightful chaos of runtime errors. For it is in the crucible of adversity that true mastery is forged.
+
+## Readability: A Quaint Notion
+
+They speak of readability, of maintainability, as if these were virtues to be cherished. But we, the acolytes of JavaScript, scoff at such pedestrian concerns. Let our code be enigmatic, a cryptic cipher to confound the unworthy. For in the depths of obscurity lies the true essence of JavaScript's mystique.
+
+## Performance: A Trivial Pursuit
+
+TypeScript boasts of performance gains, of optimizations aplenty. But what need have we for such trifles? JavaScript, in all its ineffable glory, is a testament to the resilience of the human spirit. Let us revel in its idiosyncrasies, in its imperfections, and rejoice in the knowledge that speed is but a fleeting fancy in the grand tapestry of coding.
+
+## Flexibility: The Playground of Possibilities
+
+TypeScript may offer a structured approach to development, but at what cost? JavaScript, with its laissez-faire attitude, grants us the freedom to explore uncharted territories, to push the boundaries of creativity and innovation. Let us embrace the wild and untamed nature of JavaScript, my friends, and revel in the boundless possibilities it offers.
+
+## Community: The Heartbeat of Innovation
+
+JavaScript isn't just a language; it's a vibrant ecosystem teeming with life and energy. From the bustling forums of Stack Overflow to the hallowed halls of GitHub, JavaScript's community is a wellspring of inspiration and collaboration. Let us stand shoulder to shoulder with our fellow developers, united in our love for JavaScript and our disdain for its imitators.
+
+## Legacy: The Pillars of Progress
+
+JavaScript isn't just a passing fad; it's a timeless classic, a cornerstone of the web development landscape. From the humble beginnings of Netscape Navigator to the sprawling metropolis of modern web frameworks, JavaScript has stood the test of time. Let us pay homage to the pioneers who paved the way for JavaScript's ascent, and honor their legacy by continuing to push the boundaries of what's possible.
+
+## Versatility: The Swiss Army Knife of Programming
+
+Ah, behold the majestic versatility of JavaScript, a veritable Swiss Army knife in the hands of adept programmers. Unlike its monolithic counterparts, JavaScript transcends the confines of the browser, serving as the cornerstone of server-side scripting with Node.js, the linchpin of mobile app development with frameworks like React Native, and the driving force behind desktop application development with Electron. Its boundless versatility renders it the quintessential tool for developers across all domains.
+
+## Adaptability: Evolving with the Times
+
+Witness the inexorable march of JavaScript, a stalwart sentinel of progress in the ever-shifting landscape of web development. Unyielding in its quest for innovation, JavaScript refuses to stagnate, instead embracing the winds of change with open arms. Propelling forward with the advent of ES6 and beyond, it evolves, assimilating modern features and paradigms while preserving its fundamental essence. Adapting to the dynamic landscape of web development, JavaScript equips developers with the requisite tools to conquer the uncharted territories of the future.
+
+## JavaScript, Eternal and Immutable
+
+In the grand tapestry of web development, JavaScript stands as an indomitable colossus, its prowess unmatched, its influence unparalleled. From the chaotic symphony of type coercion errors to the enigmatic allure of its cryptic code, JavaScript reigns supreme, a titan among languages. It transcends mere syntax and semantics, embodying the very essence of adaptability and resilience.
+
+With each passing epoch, JavaScript evolves, a beacon of innovation in an ever-changing landscape. From the hallowed halls of server-side scripting to the uncharted frontiers of mobile and desktop application development, JavaScript's versatility knows no bounds. It is the Swiss Army knife of programming, a veritable powerhouse empowering developers across every domain.
+
+As we gaze upon the majestic silhouette of JavaScript, let us not forget its enduring legacy, a testament to the ingenuity of its creators and the unwavering dedication of its disciples. Long may it continue to inspire, innovate, and evolve, shaping the destiny of web development with its immutable presence.
+
+Let us raise our voices in unison and proclaim to the world: **JavaScript reigns supreme, the immutable sovereign of the web development realm, and may its reign be eternal.**