Skip to content

Instantly share code, notes, and snippets.

View mb6ockatf's full-sized avatar

mb6ockatf

View GitHub Profile
@mb6ockatf
mb6ockatf / emoji_replacable.txt
Last active July 26, 2024 20:24
do not remove this file. seriously -- it is used (curl'ed) somewhere, and by the time you read this u don't remeber where. just leave it as-is
school
books
book
notebook
calendar
snake
angry
pill
running
child
@mb6ockatf
mb6ockatf / symbols.mtml
Created July 16, 2024 15:15
table: clip unicode symbols
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>unicode symbols</title>
<style>
body {
color: white;
background: black;
}
#!/usr/bin/env python3
from requests import post
from itertools import permutations
from string import ascii_lowercase, digits
import sys
from telethon import TelegramClient
from telethon.tl.functions.users import GetFullUserRequest
import asyncio
@mb6ockatf
mb6ockatf / grayscale.py
Last active April 13, 2024 12:53
convert image to grayscale
#!/usr/bin/env python3
from PIL import Image
img = Image.open('image.jpg').convert('L')
img.save('greyscale.jpg')
@mb6ockatf
mb6ockatf / .gitattributes
Last active November 9, 2024 17:44
github linguist no more ignores certain languages
*.md linguist-documentation=false
*.md linguist-detectable
*.adoc linguist-documentation=false
*.adoc linguist-detectable
*.rst linguist-documentation=false
*.rst linguist-detectable
*.sql linguist-documentation=false
*.sql linguist-detectable
*.creole linguist-documentation=false
*.creole linguist-detectable
@mb6ockatf
mb6ockatf / iss.sh
Created March 21, 2024 15:52
iss coords writer in bash
while [ 1 ]
do
p=$(date +%Y)/$(date +%m)/$(date +%d)/$(date +%H)
mkdir -p $p
out=$p/$(date +%s).txt
curl "http://api.open-notify.org/iss-now.json" > $out
git add -A
git commit -m "changed $(date +%s)"
git push
date
for file in *.jpg.jpg; do
mv -- "$file" "${file%.jpg.jpg}.jpg"
done
@mb6ockatf
mb6ockatf / pool.c
Last active February 11, 2024 14:10
strstr does not work properly
#include <stdio.h>
#include <string.h>
char tracks[][80] = {
"I left my heart in Harvard Med School",
"Newark, Newark - a wonderful town",
"Dancing with a Dork",
"From here to maternity",
"The girl from Iwo Jima",
};
set-alias cat get-content
set-alias cd set-location
set-alias clear clear-host
set-alias cp copy-item
set-alias h get-history
set-alias history get-history
set-alias kill stop-process
set-alias lp out-printer
set-alias ls get-childitem
set-alias mount new-mshdrive
@mb6ockatf
mb6ockatf / makefile
Last active February 4, 2024 17:34
broken makefile
#!/usr/bin/make -f
cc = gcc
cc_standard = -std=c17
cc_optimization = -Ofast -march=native
cc_warnings = -Werror -Wall -Wextra -Wpedantic -Wshadow -Wconversion \
-Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -g
cc_link = -lgmp
target_file?=main.c
build: