Skip to content

Instantly share code, notes, and snippets.

Avatar
🖥️
eliving (elivecd.org)

TheTechRobo

🖥️
eliving (elivecd.org)
View GitHub Profile
@TheTechRobo
TheTechRobo / objection.lol_urltoapi.py
Created May 25, 2022
Not really meant for public use
View objection.lol_urltoapi.py
import re
import sys
print("URL: ", file=sys.stderr, end="")
url = input()
getId = lambda url : url.split("/")[-1].strip() or url.split("/")[-2].strip()
if re.match("https?://(www\.)?objection.lol/objection/", url):
splitted = getId(url)
@TheTechRobo
TheTechRobo / Recover_Seemingly_Crashed_Drive.md
Last active May 13, 2022
How to recover a drive that fails to open with "No such device or address"
View Recover_Seemingly_Crashed_Drive.md

Prerequisites

  • Linux kernel 2.7+ (with headers)

Symptoms

Your symptoms might be different, with the same root problem, but these were mine)

  • lsblk shows the drive, but DOES NOT SHOW the partitions, like:
@TheTechRobo
TheTechRobo / how2twitter.avi
Last active Sep 22, 2022
How I archive twitter accounts and hashtags and how you can too
View how2twitter.avi
Hello!
======
Table of Contents;
The Fast Way
The Thorough Way
Wait, how do I read this file?
Archiving Twitter accounts and hashtags is easy. Here's how!
View BENCHMARKS
=====================
#lrz/zstd benchmarks#
=====================
Source File
-----------
A 700-ish MB jsonl file
lrzip (LZO)
@TheTechRobo
TheTechRobo / log.txt
Last active Jun 1, 2020
Create A Log in Python
View log.txt
Here is a website that shows you how to make a log :
https://docs.python.org/3/howto/logging.html
@TheTechRobo
TheTechRobo / accessSyllable.txt
Created Aug 27, 2019
If Syllable's servers are down.... (which they always are)
View accessSyllable.txt
Syllable's servers have been down for at least a year — look at the Wayback Machine
If they are still down (syllable.org) then go to this website:
http://web.archive.org/web/*/http://web.syllable.org/pages/index.html
and choose a snapshot that is blue. The newest one that worked for me is
http://web.archive.org/web/20170910000623/http://web.syllable.org/pages/index.html
(2017 September)
@TheTechRobo
TheTechRobo / 1prankYourFriends.bat
Last active Feb 26, 2022
I suck at batch files, but these are two commands that can prank your non-techie friends :) (see the other file)
View 1prankYourFriends.bat
@echo off
title CATASTROPHIC ERROR
prompt CATASTROPHIC ERROR
@TheTechRobo
TheTechRobo / coin_flip_sim.py
Last active Jul 27, 2019 — forked from An-Nguyen1/Coin flip simulator.py
Simulate as many coin flips as your computer can handle
View coin_flip_sim.py
import random
flips = int(input('how many times do you want to flip the coin? '))
outcomes = ['head','tail']
wieghts = [.5,.5]
head=0
tail=0
for flip in range(flips):
h_t = random.choice(outcomes)
if h_t == 'head':
head += 1
@TheTechRobo
TheTechRobo / lockMyMac.py
Last active Jul 27, 2019
lock your Mac from the CLI
View lockMyMac.py
import os
print("John Lockeing the computer............")
os.system('/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend')
print("Locked")
View byeByeDock.sh
defaults write com.apple.Dock autohide-delay -float 3 && killall Dock
echo "Now your Dock, when you hide it, will take at least three seconds to reopen, for me it takes 4-5 secs."
echo "Just turn on Dock hiding and it will work"