Skip to content

Instantly share code, notes, and snippets.

View TheTechRobo's full-sized avatar
🕔
endless procrastination

TheTechRobo

🕔
endless procrastination
View GitHub Profile
@TheTechRobo
TheTechRobo / bot.py
Last active September 15, 2023 21:29
import discord, aiohttp, asyncio
from config import TOKEN
bot = discord.Bot()
@bot.event
async def on_ready():
global session
session = aiohttp.ClientSession()
@TheTechRobo
TheTechRobo / objection.lol_urltoapi.py
Created May 25, 2022 01:55
Not really meant for public use
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 23:56
How to recover a drive that fails to open with "No such device or address"

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 August 30, 2024 21:39
How I archive twitter accounts and hashtags and how you can too
Hello!
======
Table of Contents;
The Fast Way
The Thorough Way
Wait, how do I read this file?
Archiving Twitter accounts and hashtags is easy, even without an API key. Here's how!
=====================
#lrz/zstd benchmarks#
=====================
Source File
-----------
A 700-ish MB jsonl file
lrzip (LZO)
@TheTechRobo
TheTechRobo / log.txt
Last active June 1, 2020 18:17
Create A Log in Python
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 August 27, 2019 13:27
If Syllable's servers are down.... (which they always are)
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 February 26, 2022 21:27
I suck at batch files, but these are two commands that can prank your non-techie friends :) (see the other file)
@echo off
title CATASTROPHIC ERROR
prompt CATASTROPHIC ERROR
@TheTechRobo
TheTechRobo / coin_flip_sim.py
Last active July 27, 2019 19:07 — forked from An-Nguyen1/Coin flip simulator.py
Simulate as many coin flips as your computer can handle
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 July 27, 2019 16:24
lock your Mac from the CLI
import os
print("John Lockeing the computer............")
os.system('/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend')
print("Locked")