Skip to content

Instantly share code, notes, and snippets.

View TheoChristiaanse's full-sized avatar

TheoChristiaanse

View GitHub Profile
@TheoChristiaanse
TheoChristiaanse / 55-bytes-of-css.md
Created September 25, 2022 16:07 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@TheoChristiaanse
TheoChristiaanse / licence.txt
Last active May 18, 2018 18:35
This code refreshes an output file. It will remove the file and you can resave the file later with new content. If it does not exist it will make the file to save into.
MIT License
Copyright (c) 2018 T.V. Christiaanse
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@TheoChristiaanse
TheoChristiaanse / TDMAsolver.py
Last active November 15, 2021 14:19 — forked from cbellei/TDMAsolver.py
Tridiagonal Matrix Algorithm solver in Python. I've modified the code from cbellei so, it works with python 3.0+ and implemented the use of jit to increase the speed.
import numpy as np
from numba import jit, f8
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver
@jit(f8[:] (f8[:],f8[:],f8[:],f8[:] ))
def TDMAsolver(a, b, c, d):
'''
TDMA solver, a b c d can be NumPy array type or Python list type.
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm
and to http://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-_TDMA_(Thomas_algorithm)