Skip to content

Instantly share code, notes, and snippets.

Avatar
🐱

Alsein AlseinX

🐱
View GitHub Profile
@AlseinX
AlseinX / PropertyAccessTest.cs
Last active Dec 14, 2020
Property Access Test
View PropertyAccessTest.cs
using System;
using System.Diagnostics;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
namespace PropertyAccessTest
{
internal static class Program
{
@AlseinX
AlseinX / roman.py
Created Dec 24, 2018
Formatting any positive integer to roman numerals
View roman.py
def roman(num: int) -> str:
chlist = "VXLCDM"
rev = [int(ch) for ch in reversed(str(num))]
chlist = ["I"] + [chlist[i % len(chlist)] + "\u0304" * (i // len(chlist))
for i in range(0, len(rev) * 2)]
def period(p: int, ten: str, five: str, one: str) -> str:
if p == 9:
return one + ten
View gist:ca4bbdcc6511c874e09f856f69a749cf
[root@plex ~]# cat /etc/systemd/system/minecraft@.service
[Unit]
Description=Minecraft Server %i
[Service]
WorkingDirectory=/opt/minecraft-%i
User=mcserver
ExecStart=/usr/bin/screen -DmS mc-%i /bin/java -Xmx2048M -jar minecraft_server.jar nogui