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 / 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
@ekiara
ekiara / django-manually-generate-random-secret-key.md
Created February 17, 2023 06:52
Django manually generate random secret key

Django manually generate random secret key

>>> from django.core.management.utils import get_random_secret_key
>>> get_random_secret_key()
@ekiara
ekiara / docker-container-with-2GB-RAM-limit.md
Created February 12, 2023 16:21
Docker container with 2GB RAM limit

Docker container with 2GB RAM limit

docker run -it --entrypoint "/bin/bash" --cpus="1.0" --memory="2g" ubuntu:22.10