Skip to content

Commit f556360

Browse files
committed
obsidian callouts
1 parent 9b2b5d3 commit f556360

File tree

8 files changed

+170
-10
lines changed

8 files changed

+170
-10
lines changed

content/blog-posts/2023-11-04-creating-form-spam.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ At the outset, I wasn't entirely sure how to approach this task. I had just comp
1919
## The Code
2020

2121
Below is the Python code used to automate the form spamming process:
22+
2223
```py
2324
import requests
2425
from faker import Faker

content/blog-posts/2024-04-03-picking-cybersecurity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Then came 2022, a year I've since coined "The Year of Data Breaches." Witnessing
1414

1515
## The Eureka Moment:
1616

17-
I've always had a knack for spotting patternsconnecting dots over breakfast cereal is my kind of jam. My curiosity peaked when I saw a news segment about these breaches. Despite the sea of incomprehensible numbers on the screen which were definitely just for show, something clicked. "How cool is this?" I thought. The only catch? My self-proclaimed ineptitude at math, thanks to my high school days (but that's a story for another blog post).
17+
I've always had a knack for spotting patterns, connecting dots over breakfast cereal is my kind of jam. My curiosity peaked when I saw a news segment about these breaches. Despite the sea of incomprehensible numbers on the screen which were definitely just for show, something clicked. "How cool is this?" I thought. The only catch? My self-proclaimed ineptitude at math, thanks to my high school days (but that's a story for another blog post).
1818

1919
Driven by curiosity, I dove headfirst into researching data breaches. Questions like "Why isn't our data more secure?" and "How do hackers easily snatch our information?" consumed me. This obsession, possibly fueled by my ADHD, led me to explore degrees in cybersecurity.
2020

@@ -24,4 +24,4 @@ Fast forward to March 2023, and there I was, embarking on my cybersecurity degre
2424

2525
## The Takeaway:
2626

27-
If you've made it this far, here's my nugget of wisdom: When you stumble upon something that ignites your curiosityno matter how unexpectedchase it. The path may not lead where you initially thought, but the journey? It's guaranteed to take you to places beyond your wildest dreams.
27+
If you've made it this far, here's my nugget of wisdom: When you stumble upon something that ignites your curiosity, no matter how unexpected, chase it. The path may not lead where you initially thought, but the journey? It's guaranteed to take you to places beyond your wildest dreams.

content/blog-posts/2024-04-08-sucked-at-maths-in-school.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# I sucked at maths in highschool!
1+
# I sucked at maths in highschool
22

33
Imagine thinking you're not cut out for academic success because high school was a battleground where victory seemed impossible. Now, fast forward a few years, and picture yourself receiving accolades for your mathematical success in university. Sounds like a dream? Well, it became my reality. From barely scraping by in high school to having my mathematical reports published in the Deakin Maths Yearbook – twice in a single year – my journey is a demonstration of the fact that past struggles don't define your future potential. This isn't just my story; it's a beacon of hope for anyone who's ever felt defeated by their academic journey. If you've ever doubted your capabilities or felt overwhelmed by educational hurdles, this story is especially for you.
44

5-
## Oh High school….
5+
## Oh High school…
66

77
Yep, as the title hints, I was far from a math wizard in high school. To be honest, I wasn't exactly acing any of my subjects. But here's the kicker – it really doesn't matter. Not in the grand scheme of things. My high school years were a blend of minimal effort and maximum daydreaming, partly due to un-diagnosed ADHD—a challenge I only faced head-on in adulthood. I was that student who passed, yes, but just barely, doing the absolute minimum to get by.
88

@@ -25,4 +25,3 @@ Interestingly, my work on quantum cryptography played a significant role in buil
2525
## So! Embrace the Journey
2626

2727
If there's anything my journey has taught me, it's that past academic struggles are not a life sentence. They're merely stepping stones to greater successes. Whether you're battling ADHD, facing academic hurdles, or simply doubting your capabilities, remember this: with the right strategies, support, and mindset, transformation is not just possible; it's inevitable. Your story isn't over; it's just waiting for its next chapter to be written. Share your journey, seek support when needed, and never stop exploring your passions.
28-

content/blog-posts/2025-01-17-using-figlet-and-lolcat.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Figlet is a tool for generating ASCII art from text. Use the appropriate command
1414
sudo pacman -S figlet
1515
```
1616

17-
Then do -
17+
Then do -
1818

1919
```bash
2020
yay -S figlet-fonts
@@ -34,67 +34,82 @@ sudo apt install figlet figlet-data
3434
Lolcat adds vibrant rainbow colours to your terminal output, making your Figlet creations even more eye-catching.
3535

3636
### **For Arch-based Systems:**
37+
3738
```bash
3839
sudo pacman -S lolcat
3940
```
4041

4142
### **For Ubuntu-based Systems:**
43+
4244
```bash
4345
sudo apt install lolcat
4446
```
4547

4648
---
4749

4850
## **Step 4: Verify the Installation**
51+
4952
Ensure everything is set up correctly:
5053

5154
1. **List Available Fonts:**
55+
5256
```bash
5357
figlist
5458
```
59+
5560
This command will display all of the available figlet font files on your system.
5661

5762
2. **Output all fonts to a txt file:**
5863

5964
To preview all of the available fonts, you can output them to a text file by running the following commands:
65+
6066
```bash
6167
cd ~/Desktop
6268
showfigfonts > figlet_fonts.txt
6369
```
70+
6471
This command will save the list of available figlet fonts to a text file named `figlet_fonts.txt`.
6572
Outputting to a txt file is a handy way to be able to preview **all** of the fonts available to you as there is a lot of them and your terminal may not be able to display them all at once.
6673
I've also added the output as a page if you'd like to view it [all figlet fonts](content/blog-posts/2025-01-17-using-figlet-and-lolcat.md)
6774

6875
3. **Test Figlet Output:**
69-
76+
7077
Run the following to test Figlet:
78+
7179
```bash
7280
figlet -f slant "Success"
7381
```
7482

7583
4. **Combine Figlet with Lolcat:**
76-
84+
7785
Add some colour to your output:
86+
7887
```bash
7988
figlet -f slant "Success" | lolcat
8089
```
90+
8191
You should see a colourful ASCII-styled message in your terminal.
8292

8393
![alt text](../../img/blogs/figlet/figlet1.png)
94+
8495
---
8596

8697
## **Example Usage**
98+
8799
Here are some examples to try:
88100

89101
1. **Custom Welcome Message:**
102+
90103
```bash
91104
figlet -f big "Welcome" | lolcat
92105
```
93106

94107
![alt text](../../img/blogs/figlet/figlet2.png)
95108

96109
2. **Dynamic Output:**
110+
97111
Combine Figlet and Lolcat with other commands:
112+
98113
```bash
99114
echo "Hello, $(whoami)!" | figlet | lolcat
100115
```
@@ -106,9 +121,11 @@ Here are some examples to try:
106121
Now that you have Figlet working, let’s enhance it with Lolcat’s colourful output.
107122

108123
1. **Basic Test**:
124+
109125
```bash
110126
figlet -f ansi_shadow "HI BREEZY" | lolcat
111127
```
128+
112129
This will display a vibrant, rainbow-colored message.
113130

114131
![alt text](../../img/blogs/figlet/figlet4.png)
@@ -119,28 +136,35 @@ Now that you have Figlet working, let’s enhance it with Lolcat’s colourful o
119136
- **`-a` (Animation)**:
120137
Enables animated colouring that cycles through colours over time.
121138
Example:
139+
122140
```bash
123141
figlet -f ansi_shadow "HI BREEZY" | lolcat -a
124142
```
143+
125144
![*(Video: First Animation)*](../../img/blogs/figlet/figlet5.gif)
126145

127146
- **`-d` (Delay)**:
128147
Sets the delay in milliseconds for animated frames when `-a` is enabled.
129148
Example:
149+
130150
```bash
131151
figlet -f ansi_shadow "HI BREEZY" | lolcat -a -d 5
132152
```
153+
133154
![*(Video: Delayed Animation)*](../../img/blogs/figlet/figlet6.gif)
134155

135156
- **`-F` (Frequency)**:
136157
Adjusts the rainbow frequency. Lower values create smoother gradients.
137-
Examples:
158+
Examples:
159+
138160
```bash
139161
figlet -f ansi_shadow "HI BREEZY" | lolcat -F 0.3
140162
```
163+
141164
```bash
142165
figlet -f ansi_shadow "HI BREEZY" | lolcat -F 0.5
143166
```
167+
144168
```bash
145169
figlet -f ansi_shadow "HI BREEZY" | lolcat -F 0.7
146170
```
@@ -150,21 +174,28 @@ Now that you have Figlet working, let’s enhance it with Lolcat’s colourful o
150174
- **Without Options**:
151175
By default, `lolcat` applies a static rainbow gradient.
152176
Example:
177+
153178
```bash
154179
figlet -f ansi_shadow "HI BREEZY" | lolcat
155180
```
181+
156182
![*(Image: Static Gradient)*](../../img/blogs/figlet/figlet8.png)
157183

158184
3. **Creative Uses**:
159185
- **Rainbow String**:
186+
160187
```bash
161188
echo "Hello, Breezy!" | lolcat
162189
```
190+
163191
- **Animate Directory Listing**:
192+
164193
```bash
165194
ls -la | lolcat -a -d 10
166195
```
196+
167197
- **Rainbow File Output**:
198+
168199
```bash
169200
cat yourfile.txt | lolcat -a -d 3
170201
```
@@ -181,6 +212,7 @@ Decide on the text you'd like to display, whether to use Lolcat, and which fonts
181212
2. Add the following line at the very beginning to display your message every time you open the terminal:
182213

183214
(can change the message, font and lolcat options to whatever you'd like)
215+
184216
```bash
185217
figlet -f ansi_shadow "HI BREEZY" | lolcat -F 0.3
186218
```
@@ -189,7 +221,7 @@ Decide on the text you'd like to display, whether to use Lolcat, and which fonts
189221
190222
Here’s an example of how it looks when I first open my terminal:
191223
![alt text](../../img/blogs/figlet/figlet9.png)
192-
224+
193225
---
194226
195227
### **Using Figlet with Custom Colours**
@@ -198,6 +230,7 @@ For a more personalised touch, you can use ANSI colour codes to apply specific c
198230
199231
1. **Run the Following Script**:
200232
This script uses a set of predefined ANSI colours to apply vibrant hues to Figlet text, cycling through them line by line:
233+
201234
```bash
202235
# Define colors
203236
colors=(
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# How to make Custom Callouts in Obsidian
2+
3+
After spending some time experimenting with different ways to style my notes, I realized I wanted custom callouts in Obsidian, but without adding yet another plugin. I’m trying to keep my setup lean and avoid relying on too many plugins for core features. This guide is the result of my process figuring out how to create my own custom callouts using just CSS, so you can do the same!
4+
5+
Callouts are a powerful way to visually style notes in [Obsidian](https://obsidian.md), especially when organising research, study notes, to-do lists, or even documenting your projects. While Obsidian comes with built-in callout styles like `> [!note]`, you can easily create your own custom callouts with a bit of CSS.
6+
7+
This post will walk you through how to make your own **custom callout blocks** in Obsidian.
8+
9+
---
10+
11+
## Step 1: Enable Custom CSS Snippets
12+
13+
Before we begin, make sure you’ve enabled CSS snippets in Obsidian:
14+
15+
1. Open **Settings****Appearance**
16+
2. Scroll down to **CSS snippets**
17+
3. Click **Open snippets folder**
18+
4. Create a new `.css` file, for example: `custom-callouts.css`
19+
5. Back in Obsidian, toggle your new snippet **on**
20+
21+
---
22+
23+
## Step 2: Define a Custom Callout Block in the css file
24+
25+
Here’s an example of a custom callout called `figure` with a pink theme and a pencil icon:
26+
27+
```css
28+
/* === FIGURE === */
29+
.callout[data-callout="figure"] {
30+
--callout-color: 255, 121, 198;
31+
--callout-icon: lucide-pencil;
32+
background-color: rgba(255, 121, 198, 0.2);
33+
}
34+
```
35+
36+
To use this in your note, write:
37+
38+
```markdown
39+
> [!figure]
40+
> This is a **figure** callout. Great for highlighting diagrams or illustrations.
41+
```
42+
43+
This is how it looks in Obsidian:
44+
45+
![alt text](../../img/blogs/obidian_callouts/fig1.png)
46+
47+
And voilà, Obsidian will render it with your defined styles.
48+
49+
---
50+
51+
## Customise Labels, Icons & Colors
52+
53+
You can define any name for your callout, it can be `[!theorem]`, `[!tip]`, `[!poetry]`, or whatever suits your workflow. Each one can be styled uniquely by modifying:
54+
55+
* `--callout-color`: the RGB value of your theme
56+
* `--callout-icon`: choose any [Lucide Icon](https://lucide.dev/) (used by Obsidian)
57+
58+
Here's another example using a theorem block:
59+
60+
```css
61+
/* === THEOREM === */
62+
.callout[data-callout="theorem"] {
63+
--callout-color: 189, 147, 249;
64+
--callout-icon: lucide-square-sigma;
65+
background-color: rgba(189, 147, 249, 0.2);
66+
}
67+
```
68+
69+
Use it in your note like this:
70+
71+
```markdown
72+
> [!theorem]
73+
> **Theorem (Pythagoras)**
74+
> In a right-angled triangle:
75+
> $a^2 + b^2 = c^2$
76+
```
77+
78+
This will render as:
79+
80+
![alt text](../../img/blogs/obidian_callouts/fig2.png)
81+
82+
Most of the ones I've made have been for equations, theorems, figures or other mathematical content, but you can create any type of callout you need. I even made some "warning" ones:
83+
84+
```css
85+
/* === ATTENTION, CAUTION, WARNING === */
86+
.callout[data-callout="attention"],
87+
.callout[data-callout="caution"],
88+
.callout[data-callout="warning"] {
89+
--callout-color: 241, 250, 140;
90+
--callout-icon: lucide-alert-triangle;
91+
background-color: rgba(241, 250, 140, 0.2);
92+
}
93+
```
94+
95+
Use them like this:
96+
97+
```markdown
98+
99+
> [!attention]
100+
> Attention! This area is under construction.
101+
102+
> [!caution]
103+
> Caution: The process may overwrite existing data.
104+
105+
> [!warning]
106+
> Warning: Unsaved changes will be lost.
107+
```
108+
109+
This will render as:
110+
111+
![alt text](../../img/blogs/obidian_callouts/fig3.png)
112+
113+
---
114+
115+
## Useful Links
116+
117+
* [📘 Obsidian Callouts Documentation](https://help.obsidian.md/Editing+and+formatting/Callouts)
118+
* [🎨 Lucide Icon Library](https://lucide.dev/)
119+
120+
---
121+
122+
## 🧪 Final Tips
123+
124+
* You can define as many custom callouts as you like, one for each purpose.
125+
* Keep your styles readable by using soft background `rgba` values.
126+
* Consider matching your callouts to your Obsidian theme for a cohesive look.
127+
* You can even use transparent or darkened backgrounds to create layered effects.

img/blogs/obsidian_callouts/fig1.png

7.04 KB
Loading

img/blogs/obsidian_callouts/fig2.png

7.78 KB
Loading

img/blogs/obsidian_callouts/fig3.png

17.2 KB
Loading

0 commit comments

Comments
 (0)