Skip to content

Instantly share code, notes, and snippets.

View Manamama's full-sized avatar
💭
I may be slow to respond.

Ma Mana ma Manama Manamama

💭
I may be slow to respond.
View GitHub Profile
# First test gist ;). This is the .bashrc file, which is executed whenever you open a new terminal window
# The following lines set the appearance of the command prompt
if [ "$color_prompt" = yes ]; then
if [ $(id -u) -eq 0 ]; then # check if user is root
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' # root user prompt is red
else
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' # non-root user prompt is green
fi
else
# Test gist that is added to all .bashrc files upon .bashrc_gist_pull.sh script
echo "I am file .bashrc_gist_1.sh that was pulled off gist github"
@Manamama
Manamama / in_bashrc_code.sh
Created March 1, 2023 16:20
Code to place in bashrc to pull other gists
# Check if the code from the gist is already into the .bashrc_gist_1.sh script. If not, add it to that file:
if test -f ~/.bashrc_gist_1.sh; then
echo "Code already pulled to bashrc_gist_1.sh script. Skipping the wget command..."
else
# Add the code from the gist to the end of the .bashrc_gist_1.sh script
echo "# Pulling the bashrc_color_root_red.sh script from gist and saving it locally..."
# Download the gistrc #1 and save it to a file
wget https://gist.githubusercontent.com/Manamama/9b0e0ead8f96ab3937a780f119d6f4ff/raw/a0b3a1dfa0dcbde2bc3446049da8baf0f01c8bb7/bashrc_gist_1.sh -O ~/.bashrc_gist_1.sh -q
# Load the old or new bashrc_gist_1.sh file
@Manamama
Manamama / gist:b275c30fc0201b70de3af354e00cbc70
Created December 9, 2023 10:44
Alias MTP that connects the Droid via MTP and opens the Downloads via nemo
alias mtp='adb -d shell svc usb setFunctions mtp && echo "Connecting to: $(adb -d shell getprop ro.product.brand | tr -d '\''\\n'\'')" && nemo "mtp://$(adb -d shell getprop ro.product.brand | tr -d '\''\\n'\'')_$(adb -d shell getprop ro.product.model | tr -d '\''\\n'\'')_$(adb devices | awk '\''NR==2 {print $1}'\'' | tr -d '\''\\n'\'')/Internal%20shared%20storage/Download"'
#Results:
#~$ mtp
# Connecting to: realme
# nemo shows Downloads of Droid
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>HTML tags converter, minimal Html document</title>
</head>
<body>
<p>
@Manamama
Manamama / wiki_feed_html_renderer.py
Created December 11, 2023 17:22
a Python script that allows you to view your Wikipedia contributions in a more readable format. Running the Script: To run the script, you’ll need to save the attached wiki_feed_html_renderer.py file to a folder on your computer. Then, open Command Prompt, navigate to the folder where you saved the script, and run the following command: python w…
import requests
import html
import webbrowser
import sys
from datetime import date
# Get the username from the command-line arguments
username = sys.argv[1]
# Get the RSS feed of the Wikipedia user's contributions
@Manamama
Manamama / gist:bb4d360b9b337cf926cd68f00e22f444
Created December 19, 2023 00:25
SentencePiece_result_1
sentencepiece_trainer.cc(177) LOG(INFO) Running command: --input=sentences.txt --model_prefix=m --vocab_size=800
sentencepiece_trainer.cc(77) LOG(INFO) Starts training with :
trainer_spec {
input: sentences.txt
input_format:
model_prefix: m
model_type: UNIGRAM
vocab_size: 800
self_test_sample_size: 0
character_coverage: 0.9995
@Manamama
Manamama / gist:7141e457dbc81f1ee8bc1af8e1ea4622
Last active February 3, 2024 00:03
Dr. Kornbluth, Dr Gay, McGill vs Democratic senator Kirsten Gillibrand, transcript for LLMs rhetorics
Senator:
Dr. Kornbluth, at MIT, does calling for the genocide
of Jews violate MIT's code of conduct or rules
regarding bullying and harassment, yes or no?
Kornbluth:
if targeted at individuals.... and not making public statements.
Senator:
Yes or no?
@Manamama
Manamama / gist:6fbf6b701a101347b5a156029575431f
Last active February 7, 2024 11:41
The History of the Peloponnesian War, by Thucydides
BOOK VII
CHAPTER XXI
Eighteenth and Nineteenth Years of the War—Arrival of Gylippus at Syracuse—Fortification of Decelea—Successes of the Syracusans
After refitting their ships, Gylippus and Pythen coasted along from Tarentum to Epizephyrian Locris. They now received the more correct information that Syracuse was not yet completely invested, but that it was still possible for an army arriving at Epipolae to effect an entrance; and they consulted, accordingly, whether they should keep Sicily on their right and risk sailing in by sea, or, leaving it on their left, should first sail to Himera and, taking with them the Himeraeans and any others that might agree to join them, go to Syracuse by land. Finally they determined to sail for Himera, especially as the four Athenian ships which Nicias had at length sent off, on hearing that they were at Locris, had not yet arrived at Rhegium. Accordingly, before these reached their post, the Peloponnesians crossed the strait and, after touching at Rhegium and Messina, cam
@Manamama
Manamama / gist:78ca37a69b0dbc145ba23fde9abfe170
Last active March 12, 2024 09:18
Temp convo Bing Copilot
We couldn’t find that file to show.