Skip to content

Instantly share code, notes, and snippets.

View magistau's full-sized avatar
☮️
pls no war

Mg. Tau magistau

☮️
pls no war
View GitHub Profile
@magistau
magistau / group.py
Last active July 15, 2021 20:32
Useful snippets
import itertools as it
def group(iterable, size, fill=None):
yield from it.zip_longest(*[iter(iterable)] * size, fillvalue=fill)
if __name__ == '__main__':
print(*group(range(10), 3, 0), sep=', ') # -> (0, 1, 2), (3, 4, 5), (6, 7, 8), (9, 0, 0)
@magistau
magistau / colored_memberlist.css
Last active June 8, 2020 05:12
Colored memberlist, made by @L0C4LH057
span[class*="roleColor"]::after {
content: "";
background: linear-gradient(to right, transparent, currentColor 40%);
width: 100%;
height: 100%;
position: absolute;
opacity: .1;
left: 0;
top: 0;
border-radius: 10px;