Skip to content

Instantly share code, notes, and snippets.

View aamnah's full-sized avatar
💭
the learning never stops

Aamnah aamnah

💭
the learning never stops
View GitHub Profile
@aamnah
aamnah / README.md
Last active October 18, 2025 16:07
Cheats and helpers for creating a custom oh-my-zsh theme and git prompt

Zsh custom git prompt cheatsheet

Everything you need for customizing your git prompt in oh-my-zsh

  • print and echo commands for all functions in the git plugin. Printing and echoing because then i can check what values are outputted. Massively helpful when creating a theme.
  • a list of all the variables that you can use to customize $(git_prompt_info), thanks to vergenzt
grep -o "ZSH_THEME_GIT_[A-Z_]\+" lib/git.zsh| sort | uniq
@aamnah
aamnah / install-apps.sh
Last active June 1, 2025 17:56
Bash script to install packages [Git, s3cmd] on a new system. For Debian and Ubuntu. To run, copy the script to the server and run ``bash install-apps.sh``
#!/bin/bash/
#######################################
# Bash script to install apps on a new system (Ubuntu)
# Written by @AamnahAkram from http://aamnah.com
#######################################
## Update packages and Upgrade system
sudo apt-get update -y
## Git ##
@aamnah
aamnah / install-packet-tracer.md
Last active March 5, 2025 09:38
Install Cisco Packet Tracer on Ubuntu 24.04

If you are getting the following errors, read on..

Error while installing Packet Tracer

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
#!/bin/sh
echo "\n Installing dependencies..."
sudo apt update
sudo apt install -y cmake libicu-dev libpthread-stubs0-dev
echo "\n Downloading source files..."
git clone https://github.com/octobanana/peaclock.git
cd peaclock
@aamnah
aamnah / quick-actions-finder-macos-big-sur.md
Last active February 25, 2025 23:20 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add Quick Actions to Finde in macOS Big Sur to open a folder in VS Code
  • Open Automator
  • Choose Quick Action as the document type
  • Change Workflow receives current to files or folders in Finder.app
  • For Action, choose Open Finder items from the left hand sidebar
  • Change Open with to Visual Studio Code.app (find it in Other... )
  • For the Icon, change Image to "Choose..." and select the Visual Stuido Code app. It'll automatically pick the icon
  • Save it (Cmd+S) as something like "Open in VS Code"
@aamnah
aamnah / list-articles-by-collection.liquid
Last active February 8, 2025 22:34 — forked from nternetinspired/output-articles-by-collection.liquid
Loop through Jekyll collections and list their posts
{% comment %}
Loops though every collection you defined in _config.yml and grabs the pages they contain; outputting titles.
{% endcomment %}
{% for collection in site.collections %}
{% assign name = collection.label %}
<h1>{{ name }}</h1>
@aamnah
aamnah / check_os_ostype.sh
Last active January 17, 2025 05:30
Check operating system inside a bash script and change commands
# Flush DNS cache
if [[ $OSTYPE == darwin* ]]; then
# works on macOS
alias flushdns='sudo dscacheutil -flushcache'
elif [[ $OSTYPE == linux* ]]; then
# works on Ubuntu 18.04+
alias flushdns='sudo systemd-resolve --flush-caches'
fi
@aamnah
aamnah / wmo_weather_descriptions.json
Last active July 18, 2024 09:31 — forked from stellasphere/descriptions.json
WMO WW weather interpretation code descriptions (& images)
{
"0": {
"day": {
"description": "Sunny",
"image": "http://openweathermap.org/img/wn/01d@2x.png"
},
"night": {
"description": "Clear",
"image": "http://openweathermap.org/img/wn/01n@2x.png"
}
@aamnah
aamnah / markdown_sample.md
Last active June 27, 2024 12:47
An exhibit of Markdown
title date draft tags
Typography sample
2024-06-26
true
sample

A lead or excerpt should go here. two or three lines are good. About 320 chars is also fine.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta, in dolores maxime eveniet saepe libero eum consequatur, commodi enim eos ab doloremque ratione illum quaerat voluptas ipsa explicabo corrupti laborum excepturi. Adipisci, dolores, recusandae! Sit tempora dolorum, ipsum cupiditate libero.
@aamnah
aamnah / typography_sample.html
Last active June 27, 2024 12:39
HTML Typography Tags
<p>A lead or excerpt should go here. two or three lines are good. About 320 chars is also fine.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Soluta, in dolores maxime eveniet saepe libero eum consequatur, commodi enim eos ab doloremque ratione illum quaerat voluptas ipsa explicabo corrupti laborum excepturi. Adipisci, dolores, recusandae! Sit tempora dolorum, ipsum cupiditate libero.</p>
<!--more-->
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>