Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@andersevenrud
andersevenrud / 0-README.md
Last active March 12, 2025 14:09
3D Printing Guide w/Creality Ender 3 (v2)

3D Printing Guide w/Creality Ender 3 (v2)

This is just a dump of discoveries, experience, and general insights.

ℹ️ Does not contain any assembly related information.

ℹ️ A lot of this applies to 3D printers in general.

Divided into the following documentation, in order:

aahed
aalii
aapas
aargh
aarti
abaca
abaci
aback
abacs
abaft
@SubhrajitPrusty
SubhrajitPrusty / purge.py
Last active March 15, 2025 18:58
Simple discord bot to kick everyone and delete all channels
import discord
from discord.ext.commands import has_permissions, MissingPermissions
from discord.ext import commands
intents = discord.Intents.default()
intents.members = True
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.command()
@has_permissions(kick_members=True)
@seanblanchfield
seanblanchfield / gcal_countries.py
Created July 29, 2021 14:27
Google calendar public holiday names by country
# Complete mapping of ISO 3166 2-letter country codes to descriptions used in Google calendar URLs, accurate as of 29 July 2021.
iso_to_gcal_description = {
"ad": "ad",
"ae": "ae",
"af": "af",
"ag": "ag",
"ai": "ai",
"al": "al",
"am": "am",

The Mahjong Language

プログラムコードは 🀀🀁🀂🀃🀄🀅🀆 🀇🀈🀉🀊🀋🀌🀍🀎🀏 🀐🀑🀒🀓🀔🀕🀖🀗🀘 🀙🀚🀛🀜🀝🀞🀟🀠🀡 の文字列のみで構成される。

言葉の定義

  • 牌: 「🀀🀁🀂🀃🀄🀅🀆 🀇🀈🀉🀊🀋🀌🀍🀎🀏 🀐🀑🀒🀓🀔🀕🀖🀗🀘 🀙🀚🀛🀜🀝🀞🀟🀠🀡」の34種類の麻雀牌を表す文字のいずれか1文字
  • 山: 牌のみで構成される文字列。長さに制限はない
  • 雀士: この言語を解釈し、実行する仮想的な人物. 以下を持つ.
    • 手牌: 長さ13の山。初期値「🀄🀄🀄🀄🀄🀄🀄🀄🀄🀄🀄🀄🀄」
  • PC(Program Counter): int64型の数。初期値 0。
@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active March 20, 2025 21:28
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@33eyes
33eyes / commit_jupyter_notebooks_code_to_git_and_keep_output_locally.md
Last active April 7, 2025 11:33
How to commit jupyter notebooks without output to git while keeping the notebooks outputs intact locally

Commit jupyter notebooks code to git and keep output locally

  1. Add a filter to git config by running the following command in bash inside the repo:
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'  
  1. Create a .gitattributes file inside the directory with the notebooks

  2. Add the following to that file:

@nntrn
nntrn / espn-api-list.md
Last active April 19, 2025 03:15
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

@moesoha
moesoha / worker.js
Last active March 15, 2025 18:53
Auto kick any joining users from Telegram group (deployed on Cloudflare Worker)
addEventListener('fetch', event => event.respondWith(handleRequest(event.request)));
// Add environment variable `TGBOT_TOKEN` via Worker-Settings
async function requestTelegramBotAPI(method, payload) {
return fetch(`https://api.telegram.org/bot${TGBOT_TOKEN}/${method}`, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8"
},
body: !payload ? undefined : JSON.stringify(payload)
@scootcho
scootcho / EpsBulkConvertSVG.js
Created June 16, 2020 03:26
adobe illustrator EPS to SVG bulk conversion
/**********************************************************
DESCRIPTION
This sample gets files specified by the user from the
selected folder and batch processes them and saves them
as SVGs in the user desired destination with the same