Skip to content

Instantly share code, notes, and snippets.

View Demindiro's full-sized avatar
🦆
🦀

David Hoppenbrouwers Demindiro

🦆
🦀
View GitHub Profile
@Demindiro
Demindiro / sudoku
Last active October 15, 2021 18:31
Simple sudoku solver written in Rust
___ ___ __6
__6 _2_ 7__
789 45_ 1_3
___ 8_7 __4
___ _3_ ___
_9_ __4 2_1
312 97_ _4_
_4_ _12 _78
@Demindiro
Demindiro / tictactoe.py
Created October 7, 2021 21:50
Simple text-based Tic Tac Toe implementation. I have no idea why I made this.
#!/usr/bin/env python3
# tictactoe by David Hoppenbrouwers
#
# To the extent possible under law, the person who associated CC0 with
# David Hoppenbrouwers has waived all copyright and related or neighboring rights
# to David Hoppenbrouwers.
#
# You should have received a copy of the CC0 legalcode along with this
# work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
@Demindiro
Demindiro / outline.shader
Last active October 7, 2021 21:51
2D outline shader
// Adapted from https://github.com/steincodes/godot-shader-tutorials/blob/master/Shaders/outline.shader
shader_type canvas_item;
render_mode unshaded;
uniform int size : hint_range(0,10);
uniform float precision : hint_range(0,1);
uniform vec4 outline_color : hint_color;
varying vec2 o;
#!/usr/bin/env python3
def print_heap(l, lim=None):
lim = lim if lim else len(l)
for i in range((lim - 2) // 2 + 1):
m = i * 2 + 1
n = i * 2 + 2
d, k = 0, i + 1
@Demindiro
Demindiro / netlogin.py
Last active February 21, 2019 11:36
A script to automatically login for Kotnet
#!/usr/bin/env python3
# Autologin for Kotnet
# Copyright (C) lololol
# This file is licensed under the AGPLv3
import requests
import re
from config import *