Skip to content

Commit dc82e0d

Browse files
Add devcontainer configuration and update blog markdown for consistent syntax highlighting
1 parent 939bd95 commit dc82e0d

8 files changed

+85
-50
lines changed

.devcontainer/devcontainer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
3+
{
4+
"name": "Alpine",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
7+
"features": {
8+
"ghcr.io/devcontainers/features/hugo:1": {"extended": true},
9+
"ghcr.io/prulloac/devcontainer-features/pre-commit:1": {}
10+
}
11+
12+
// Features to add to the dev container. More info: https://containers.dev/features.
13+
// "features": {},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Use 'postCreateCommand' to run commands after the container is created.
19+
// "postCreateCommand": "uname -a",
20+
21+
// Configure tool-specific properties.
22+
// "customizations": {},
23+
24+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25+
// "remoteUser": "root"
26+
}

content/blog/effective-version-management-of-programming-languages-on-local-machines.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,62 +26,62 @@ For Java, Groovy, Scala, and Sbt, you can use [SDKMAN!](https://sdkman.io/) to m
2626

2727
To install SDKMAN!, run:
2828

29-
```sh
29+
```bash
3030
curl -s "https://get.sdkman.io" | bash
3131
```
3232

3333
To list the versions of Java installed via SDKMAN!, run:
34-
```
34+
```bash
3535
sdk list java
3636
```
3737

3838
To install a specific version of Java, run:
39-
```
39+
```bash
4040
sdk install java <java_version>
4141
```
4242

4343
To make a version of Java the default, run:
44-
```
44+
```bash
4545
sdk default java <java_version>
4646
```
4747

4848
Similarly, you can manage Groovy, Scala, and Sbt versions using SDKMAN!:
4949

5050
To install a specific version of Groovy, run:
51-
```
51+
```bash
5252
sdk install groovy <groovy_version>
5353
```
5454

5555
To install a specific version of Scala, run:
56-
```
56+
```bash
5757
sdk install scala <scala_version>
5858
```
5959

6060
To install a specific version of Sbt, run:
61-
```
61+
```bash
6262
sdk install sbt <sbt_version>
6363
```
6464

6565
## Python Version Management
6666
For Python, `pyenv` is a popular choice. It simplifies the process of installing and switching between multiple Python versions.
6767

6868
To install pyenv, run:
69-
```
69+
```bash
7070
curl https://pyenv.run | bash
7171
```
7272

7373
To list the versions of Python installed via pyenv, run:
74-
```
74+
```bash
7575
pyenv versions
7676
```
7777

7878
To install a specific version of Python, run:
79-
```
79+
```bash
8080
pyenv install <python_version>
8181
```
8282

8383
To set a global version of Python, run:
84-
```
84+
```bash
8585
pyenv global <python_version>
8686
```
8787

@@ -90,23 +90,23 @@ pyenv global <python_version>
9090
The `gvm` (Go Version Manager) tool is useful for managing different versions of Go.
9191

9292
To install `gvm`, run:
93-
```
93+
```bash
9494
brew update
9595
brew install goenv
9696
```
9797

9898
To list the versions of Go installed via gvm, run:
99-
```
99+
```bash
100100
gvm list
101101
```
102102

103103
To install a specific version of Go, run:
104-
```
104+
```bash
105105
gvm install go<go_version>
106106
```
107107

108108
To set a default version of Go, run:
109-
```
109+
```bash
110110
gvm use go<go_version> --default
111111
```
112112

@@ -115,22 +115,22 @@ For Node.js, `nvm` (Node Version Manager) is widely used. It allows you to insta
115115

116116
To install `nvm`, run:
117117

118-
```
118+
```bash
119119
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
120120
```
121121

122122
To list the versions of Node.js installed via nvm, run:
123-
```
123+
```bash
124124
nvm ls
125125
```
126126

127127
To install a specific version of Node.js, run:
128-
```
128+
```bash
129129
nvm install <node_version>
130130
```
131131

132132
To set a default version of Node.js, run:
133-
```
133+
```bash
134134
nvm alias default <node_version>
135135
```
136136

content/blog/improve-performance-of-your-spring-boot-application-with-virtual-threads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Platform-Thread-7,OS-Thread-7,1
6060
Platform-Thread-8,OS-Thread-8,1
6161
6262
```
63+
6364
## Virtual Threads
6465

6566
Virtual Threads, on the other hand, are user made threads scheduled by the Java Virtual Machine (JVM) rather than the underlying OS. Virtual threads introduce an abstraction layer between operating-system processes and application-level concurrency, allowing the JVM to mediate between the operating system and the program. This allows the JVM to manage more threads than the ones available on the underlying OS.

content/blog/setting-up-essential-data-science-tools.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Before installing a specific version of Python, it's good practice to check if y
2020

2121
To find the path of the current Python executable, use:
2222

23-
```
23+
```bash
2424
which python
2525
```
2626

2727
To check the version of Python installed, run:
2828

29-
```
29+
```bash
3030
python -V
3131
```
3232

@@ -37,7 +37,7 @@ To manage different versions of Python, we'll use [pyenv](https://github.com/pye
3737

3838
You can install pyenv using Homebrew. Run the following commands:
3939

40-
```
40+
```bash
4141
brew update
4242
brew install pyenv
4343
```
@@ -47,27 +47,27 @@ brew install pyenv
4747
Here are some useful `pyenv` commands:
4848

4949
1. List available python versions:
50-
```
50+
```bash
5151
pyenv install -l
5252
```
5353

5454
2. Install a specific Python version:
55-
```
55+
```bash
5656
pyenv install 3.10
5757
```
5858

5959
3. Set a global Python version:
60-
```
60+
```bash
6161
pyenv global 3.10
6262
```
6363

6464
4. Set a local Python version for a directory:
65-
```
65+
```bash
6666
pyenv local 3.10
6767
```
6868

6969
5. Upgrade `pyenv`
70-
```
70+
```bash
7171
brew upgrade pyenv
7272
```
7373

@@ -86,20 +86,20 @@ Jupyter Notebooks are an essential tool for data analysis and visualization.
8686

8787
## Install Jupyter Lab
8888

89-
```
89+
```bash
9090
pip install jupyterlab
9191
```
9292

9393
## Launch Jupyter Lab
9494

9595
After installation, start Jupyter Lab with:
9696

97-
```
97+
```bash
9898
jupyter lab
9999
```
100100

101101
This command will open Jupyter Lab in your web browser, where you can create and manage notebooks.
102102

103103
# Summary
104104

105-
By following these steps, youll have Python, Anaconda, and Jupyter Lab set up and ready for your data science projects. Each tool plays a crucial role in developing and managing your data science workflows efficiently.
105+
By following these steps, you'll have Python, Anaconda, and Jupyter Lab set up and ready for your data science projects. Each tool plays a crucial role in developing and managing your data science workflows efficiently.

hugo.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
baseURL: "https://akashchandwani.com/"
22
title: Akash Chandwani
3-
paginate: 10
43
theme: PaperMod
54

65
enableRobotsTXT: true
@@ -119,6 +118,9 @@ menu:
119118
url: /search/
120119
weight: 30
121120

121+
pagination:
122+
pagerSize: 10
123+
122124
# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
123125
pygmentsUseClasses: true
124126
markup:

layouts/partials/comments.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<br>
2-
{{ template "_internal/disqus.html" . }}
2+
{{ partial "disqus.html" . }}

layouts/partials/disqus.html

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
<div id="disqus_thread"></div>
2-
<script type="text/javascript">
3-
4-
(function() {
5-
// Don't ever inject Disqus on localhost--it creates unwanted
6-
// discussions from 'localhost:1313' on your Disqus account...
7-
if (window.location.hostname == "localhost")
8-
return;
9-
10-
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
11-
var disqus_shortname = '{{ .Site.Config.Services.Disqus.Shortname }}';
12-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
13-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
14-
})();
1+
{{- $pc := .Site.Config.Privacy.Disqus -}}
2+
{{- if not $pc.Disable -}}
3+
{{ if .Site.Config.Services.Disqus.Shortname }}<div id="disqus_thread"></div>
4+
<script>
5+
window.disqus_config = function () {
6+
{{with .Params.disqus_identifier }}this.page.identifier = '{{ . }}';{{end}}
7+
{{with .Params.disqus_title }}this.page.title = '{{ . }}';{{end}}
8+
{{with .Params.disqus_url }}this.page.url = '{{ . | transform.HTMLEscape | safeURL }}';{{end}}
9+
};
10+
(function() {
11+
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
12+
document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
13+
return;
14+
}
15+
var d = document, s = d.createElement('script'); s.async = true;
16+
s.src = '//' + {{ .Site.Config.Services.Disqus.Shortname }} + '.disqus.com/embed.js';
17+
s.setAttribute('data-timestamp', +new Date());
18+
(d.head || d.body).appendChild(s);
19+
})();
1520
</script>
1621
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
17-
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
22+
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>{{end}}
23+
{{- end -}}

layouts/partials/head.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
{{- /* Misc */}}
146146
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
147147
{{- template "_internal/google_analytics.html" . }}
148-
{{- template "partials/templates/opengraph.html" . }}
149-
{{- template "partials/templates/twitter_cards.html" . }}
150-
{{- template "partials/templates/schema_json.html" . }}
148+
{{- template "_internal/opengraph.html" . }}
149+
{{- template "_internal/twitter_cards.html" . }}
150+
{{- template "_internal/schema.html" . }}
151151
{{- end -}}

0 commit comments

Comments
 (0)