Tex/LaTex with Markdown

Writing Mathematical Equations in Markdown Tex Format Setting up partials We will use the functionality of partial templates. https://gohugo.io/templates/partials/ Create a folder named partials under the layouts directory. \layouts\partials Place two files in this directory. mathjax.html <script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"> </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [['$', '$'] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ] } }); </script> footer.html <footer> {{ partial "mathjax.html" . }} </footer> Example of Mathematical Equations Simply surround the tex notation with $. Formula for solving quadratic equations $ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $ ...

December 30, 2024 · 1 min · 146 words · 0xuki

Bluetooth Attack Techniques

Bluetooth, a wireless technology that allows devices to exchange data over short distances, is widely used in smartphones, laptops, headphones, and other devices. While it offers convenience, it is also susceptible to certain types of security threats. Two notable methods of attack exploiting Bluetooth vulnerabilities are Bluejacking and Bluesnarfing. Below is an overview of these techniques and their implications. Bluetooth Attack Techniques: Bluejacking and Bluesnarfing 1. Bluejacking Definition: Bluejacking is the act of sending unsolicited messages to Bluetooth-enabled devices. This technique is often considered more of an annoyance than a serious security threat. ...

December 22, 2024 · 2 min · 387 words · 0xuki

Understanding Odds Ratio and Risk Ratio

📊 Understanding Odds Ratio and Risk Ratio 🎯 What is Risk Ratio? Risk Ratio is a measure that represents the ratio of risks (incidence rates) between two groups. Let’s explain using hypothetical data: COVID-19 Positive COVID-19 Negative Total Incidence Rate Not Wearing Mask 90 10 100 Pa = 90% Wearing Mask 40 160 200 Pb = 20% 💡 Calculating Risk Ratio Risk Ratio is calculated using the following formula: ...

September 1, 2024 · 2 min · 341 words · 0xuki

Hugo Cheat Sheet

Hugo is a fast static site generator written in Go. Here are its key features: ⚡ Ultra-fast build speed 📦 Simple installation and configuration 🎨 Rich themes and customization options 📝 Content management with Markdown 🔄 Hot reload for improved development efficiency 🌐 Multi-language support 🛠️ Rich shortcodes and template functionality Hugo can be used for various purposes such as blogs, portfolios, and documentation sites. 🚀 Installing Hugo While homebrew is the standard installation method, we’ll use the tar ball for better security considerations. ...

August 20, 2024 · 2 min · 310 words · 0xuki

CSRF Cross Site Request Forgery

Cross-Site Request Forgery (CSRF) What is CSRF? Cross-Site Request Forgery (CSRF) is a type of attack that forces a logged-in user to perform unwanted actions on a web application. The attacker tricks the user into submitting a malicious request to the web application, which the application then executes as if it were coming from the legitimate user. How does CSRF work? There are two main ways that CSRF attacks can be carried out: ...

April 1, 2024 · 2 min · 362 words · 0xuki

CSRF Tokens

CSRF Tokens: A Comprehensive Guide for Security Professionals Introduction Cross-Site Request Forgery (CSRF) is a malicious attack that tricks a user’s browser into performing unintended actions on a trusted website where the user is logged in. This can lead to unauthorized data access, financial losses, and other serious consequences. How CSRF Attacks Work: Victim logs in: The victim logs into a trusted website (e.g., a bank) and their browser stores a session cookie. Attacker creates a malicious link or form: The attacker creates a link or form on a different website (e.g., a website they control or a compromised ad). Victim visits the attacker’s site: The victim is tricked into visiting the attacker’s website or clicking on the malicious link. Victim’s browser sends the cookie: When the victim interacts with the attacker’s website (e.g., clicking a link or submitting a form), their browser unknowingly sends the session cookie for the trusted website along with the request. Attacker leverages the cookie: The attacker’s website receives the victim’s session cookie and includes it in a request to the trusted website. Since the website sees a valid cookie, it assumes the request is coming from the legitimate user and performs the action embedded in the attacker’s request. What is a CSRF Token? ...

March 21, 2024 · 3 min · 475 words · 0xuki

JavaScript's Promise, Async, Await in 3 minutes

JavaScript’s Promise, Async, and Await: Mastering Asynchronous Programming JavaScript reigns supreme in web development, but handling asynchronous operations can introduce complexity. This is where Promise, Async, and Await come to the rescue. These powerful tools simplify and streamline asynchronous programming in JavaScript. Promise: A Placeholder for the Future A Promise represents the eventual outcome of an asynchronous operation. It exists in three states: Pending: The operation is still underway. Resolved: The operation completed successfully, and a result is available. Rejected: The operation encountered an error. Promises offer several advantages: ...

March 19, 2024 · 2 min · 345 words · 0xuki

iPhone Memo

Shortcuts Placing Location Settings ON/OFF on the Home Button Create a shortcut to open the URL and specify the following for the URL: prefs:root=Privacy&path=LOCATION Placing it on the home button makes toggling OFF/ON easier. Kindle Auto-Read Aloud on iPhone Enabling AssistiveTouch Settings → Accessibility → Touch → AssistiveTouch → ON Screen Reading Open the Kindle app and select screen reading from AssistiveTouch◎. iPhone Reading Aloud Challenges Pauses on image pages - Japanese books often have numerous inserted images, unlike English books’ translations, resulting in frequent pauses. Fluency - English books pose no issue, but Japanese books sometimes encounter difficulties in reading aloud. Functionality - Instances where reading aloud fails to start, indicating slight instability. Forced Reset Press the volume up button. Press the volume down button. Long-press the side button. Release the button when the Apple logo appears. Official Apple Guide ...

March 9, 2024 · 3 min · 545 words · 0xuki

Happy Hacking Keyboard for mac

Happy Hacking Keyboard ⌨ I use the HKKB Type-S on Mac/OSX and have noted some recommended key configurations. Configuration of DIP Switches on the Backside Mac Compatibility SW1: OFF SW2: ON DEL key as Backspace SW3: ON SW4 and SW5 should be set to OFF. PowerSave SW6: ON/OFF It’s up to personal preference, but for efficiency, OFF is recommended. Combination with Mac App Magnet As the keyboard lacks arrow keys, I’ve configured the following shortcuts using the Command key for screen arrangement. This, coupled with the HKKB’s cursor keys, proves to be very convenient. ...

March 3, 2024 · 1 min · 142 words · 0xuki

Ubuntu on Azure Notes

Regular Maintenance sudo apt update sudo apt upgrade Error during Regular Maintenance: 11: Resource temporarily unavailable This is a solution for handling resource shortage detected during sudo upgrade. E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? Check if apt exists with the ps command. If it does, wait a bit and retry, or if possible, restarting may be quicker. ...

October 1, 2022 · 1 min · 201 words · 0xuki