Skip to content

Instantly share code, notes, and snippets.

@tadyen
tadyen / tictactoe.py
Created September 8, 2023 03:06
Tictactoe in python (cli only) with a computer adversary
# Tic-tac-toe game you can play against a computer.
# Cloned from: https://github.com/GA-SEIFXR11-my-coursework/labwork/commit/79961a3a4f111b95cd4ab643b4d9cf4517e6d80b
# This was supposed to be a simple labwork introducing classes in python.
# The task was simply to make a cli-only tictactoe game with manual inputs for both players.
# I implemented a computer adversary as well because I could.
import random
from enum import Enum
class Token_Types(Enum):
@stevecondylios
stevecondylios / resize-image-in-github-issue-github-flavored-markdown.md
Last active March 5, 2025 22:17
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown)

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

@r2k0
r2k0 / sed_snippets.sh
Last active April 4, 2025 13:35
sed examples
##FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
# triple space a file