Skip to content

Instantly share code, notes, and snippets.

View ekiara's full-sized avatar
🎯
Focusing

Eric Kiara ekiara

🎯
Focusing
View GitHub Profile
@ekiara
ekiara / generate_md5_crypt_hash.py
Created December 16, 2025 07:56
Generate MD5_CRYPT Hash
import crypt
def add_md5_crypt_hash(tuple_list):
"""
Takes a list of tuples with two strings and returns a list of tuples
with three elements: the original two strings plus an MD5_CRYPT hash
of the second string.
Args:
tuple_list: List of tuples, each containing two strings
@ekiara
ekiara / django-rest-framework-examples-for-tutorial-group.md
Last active October 28, 2025 09:59
Django Rest Framework Examples - For my Tutorial Group

Django Rest Framework Examples - For my Tutorial Group

models.py

import uuid
from django.db import models

class ActiveManager(models.Manager):
    """Returns only undeleted objects."""
@ekiara
ekiara / linux-find-all-files-and-directories-in-your-home-directory-that-are-owned-by-root.md
Created February 24, 2024 08:40
linux-find-all-files-and-directories-in-your-home-directory-that-are-owned-by-root.md

linux-find-all-files-and-directories-in-your-home-directory-that-are-owned-by-root.md

find $MY_HOME_DIRECTORY -group root
@ekiara
ekiara / ssh-cheatsheet.md
Created May 31, 2023 05:16
ssh-cheatsheet.md

ssh Cheatsheet

Keep a tunnel running from a home machine to a VPS that allows you to ssh into the home machine from the VPS

# From the home machine (to establish the tunnel)
ssh -v -R <local-port>:localhost:22 <vps-username>@<vps-hostname>

# On the vps machine (to log into the home machine)
ssh -p <local-port> localhost
@ekiara
ekiara / apt-cheatsheet.md
Created May 30, 2023 14:22
apt-cheatsheet.md

apt Cheatsheet

List all installed packages

sudo apt list --installed
sudo apt list --installed |grep conky

Completely remove an installed package

@ekiara
ekiara / adb_ussd_command.sh
Created May 14, 2023 06:16
adb_ussd_command.sh
# Start the phone dialer activity
adb shell am start -a android.intent.action.CALL -d "tel:*123#"
# Wait for the dialer to open
sleep 2
# Input the USSD command
adb shell input text "<your_ussd_code><parameter>"
# Send the USSD command
@ekiara
ekiara / deleting-caches-on-macos-to-speed-up-your-machine.md
Created April 8, 2023 07:47
Deleting Caches on macos to speed up your machine

Deleting Caches on macos to speed up your machine

This might have no real effect but I found it on an online forum somewhere

find /Users/{YOUR_USERNAME}/Library/Caches -type f -exec rm {} \;

You might have to sudo su and run this as the root user.

@ekiara
ekiara / youtube-dl-alternative.md
Created April 7, 2023 11:39
youtube-dl-alternative
@ekiara
ekiara / random-script-for-tonrandall-list-of-tuples.py
Last active March 26, 2023 14:50
random-script-for-tonrandall-list-of-tuples
"""
Random Script for TonRandall online.
DESCRIPTON:
Generate a list of tuples where the first item in the tuple
is an integer and the second item in the tuple is the first
number squared. The script should not require any user input.
USAGE
python ./random-script-for-tonrandall-list-of-tuples.py
@ekiara
ekiara / crawler_results_for_flourwatersalt_website.txt
Created March 13, 2023 09:58
crawler_results_for_flourwatersalt_website.txt
# www.flourwatersalt.com.au
https://www.flourwatersalt.com.au/
https://www.flourwatersalt.com.au/collections/all
https://www.flourwatersalt.com.au/collections/all.atom
https://www.flourwatersalt.com.au/collections/all?page=1
https://www.flourwatersalt.com.au/collections/all?page=2
https://www.flourwatersalt.com.au/collections/all?page=3
https://www.flourwatersalt.com.au/collections/all?page=4
https://www.flourwatersalt.com.au/collections/all?page=5