Skip to content

Instantly share code, notes, and snippets.

View addohm's full-sized avatar
🤬
I may be slow to respond.

Adam addohm

🤬
I may be slow to respond.
View GitHub Profile
@addohm
addohm / colors
Created February 7, 2024 16:29 — forked from dtmilano/colors
Shows terminal colors
#! /bin/bash
n=32
arg=setaf
text='Hello World! This is %s %d'
_help()
{
printf 'usage: %s [--help|-H] [--16] [--256] [-t|--tiny] [--background|-b]\n' "$(basename $0)"
exit 0
@addohm
addohm / readme.md
Last active November 21, 2023 05:45
Rotary Enclosure Kit
@addohm
addohm / main.py
Created August 7, 2023 16:34
Lottery Numbers based on historical data
import requests
from datetime import datetime
def get_mega_millions_data():
url = "https://api.opendatastack.com/v1/lottery/mega-millions"
response = requests.get(url)
if response.status_code == 200:
return response.json()
else:
raise Exception("Failed to fetch data")
@addohm
addohm / readme.md
Last active November 12, 2023 15:26
Xtool Drag Chain Conversion Instructions

Xtool Drag Chain Conversion Instructions

Warning(s):

BE CAREFUL NOT TO OVERTIGHTEN ANY SCREWS INTERFACING WITH THE PRINTED PARTS

DO NOT WORK ON YOUR LASER WITH THE POWER ON

Hardware Requirements

@addohm
addohm / gist_markdown_examples.md
Last active July 18, 2023 01:59 — forked from ww9/gist_markdown_examples.md
Gist markdown examples

Gist markdown examples

A collection of Markdown code and tricks that were tested to work in Gist.

This and all public gists in https://gist.github.com/ww9 are Public Domain. Do whatever you want with it including , no need to credit me.

Todo

  • Reformat this whole document and assimilate these:
@addohm
addohm / pi_wifi
Created April 5, 2023 00:20
8188eu on a Raspberry Pi > v.5.10.73
https://forums.raspberrypi.com/viewtopic.php?f=28&t=62371&start=1550#p1898145
sudo apt install git bc bison flex libssl-dev
git clone https://github.com/RPi-Distro/rpi-source
cd rpi-source
./rpi-source
git clone https://github.com/lwfinger/rtl8188eu
cd rtl8188eu
make
sudo make install
sudo modprobe 8188eu
@addohm
addohm / mesh_prep.py
Last active February 27, 2023 16:12
Strip image background with rembg and copy metadata to new image with pyexiftool
# import required module
import os
import cv2
import exiftool
import rembg
# assign path variables
VERBOSE = False
BASE_DIRECTORY = os.getcwd()
DESKTOP_DIRECTORY = os.path.expanduser("~\\Desktop")
@addohm
addohm / thumbit.py
Created October 2, 2022 01:08
Convert images to thumbnails in their own directory
import os
import platform
from PIL import Image
'''
Run from parent directory. Folders and files expected in `./files/images`
'''
opsys = platform.system()
if opsys.lower() == 'windows':
SLASH = "\\"
@addohm
addohm / onedrive.md
Created December 19, 2021 17:12 — forked from starlinq/onedrive.md
How to Sync Microsoft OneDrive with Ubuntu 18.04 and 20.04 (64 bit)
layout title tags date
post
How to Sync Microsoft OneDrive with Ubuntu 18.04 and 20.04 (64 bit)
ubuntu-18.04, ubuntu-20.04
2020-04-23

There are many instructions to syncronize your files with OneDrive cloud-based storage in Linux. However they typically address multiple Linux distributions that often causes a confusion or an use of some commands which have not been actually tested before publishing. This instruction is for Ubuntu 18.04 and 20.04 (64 bit) only.

In order to install onedrive, first you need to install some dependencies and set up git.

@addohm
addohm / disco_count.py
Last active September 17, 2021 01:19
Count by reading screen and writing next integer
# -*- coding: utf-8 -*-
import time
import re
import random
import pygetwindow
import pyautogui
import numpy as np
import pytesseract
import cv2