LethargicOS supports (will support) two types of executables. These are:
- Native executables (currently supported)
- WASM executables (not yet implemented)
| #include <stdlib.h> | |
| #include <stdio.h> | |
| /* Output string length */ | |
| #define OUTMIN 8 | |
| #define OUTSPAN 33 | |
| /* Define some important constants */ | |
| #define MAX_FINGERS 10 | |
| #define NUM_ROWS 4 |
| from typing import Dict, Any, Type, TypeVar, Optional, Sequence, Union | |
| from contextlib import contextmanager | |
| T = TypeVar | |
| class NamedConstantMeta(type): | |
| def __init__(cls, *args, **kwargs): | |
| super().__init__(*args, **kwargs) | |
| #: This class attribute will be the dict mapping constant names to their constants. |
| #!/bin/bash | |
| # Let's write a webserver in Bash because haha why not | |
| # Copyright (c) 2017-2020 TerrorBite <terrorbite@lethargiclion.net> | |
| # | |
| # 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 |
| { | |
| "command": "ssh -p 8822 admin@localhost", | |
| "stdout": [ | |
| [ | |
| 0.055014, | |
| "admin@localhost's password: " | |
| ], | |
| [ | |
| 2.633539, | |
| "\r\n" |
| #!/usr/bin/env python3 | |
| from sys import stdout, argv | |
| import pickle | |
| from time import sleep | |
| with open(argv[1], 'rb') as f: | |
| asciicast = pickle.load(f) | |
| pos = 0 | |
| timing = asciicast.stdout.timing.split(b'\n') |
| java_opts="$java_opts -XX:MaxGCPauseMillis=50" | |
| # Disable explicit GC. Some plugins may think it's a good idea to manually run the garbage collector. | |
| # This is never a good idea with our setup, as it introduces a pause that is usually completely avoidable. | |
| java_opts="$java_opts -XX:+DisableExplicitGC" | |
| ### OPTIMIZATION SETTINGS ### | |
| # Bukkit and Spigot synchronize things for thread safety. Some of these synchronizations are never contested under ideal conditions. |
| import struct | |
| import crc32c | |
| import errno | |
| import gw2util | |
| # Headers | |
| gw2_header1 = struct.Struct("<B3sIII") | |
| gw2_header2 = struct.Struct("<IIQII") | |
| # GW1 header |
| # Generated by the protocol buffer compiler. DO NOT EDIT! | |
| # source: chat.proto | |
| import sys | |
| _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) | |
| from google.protobuf import descriptor as _descriptor | |
| from google.protobuf import message as _message | |
| from google.protobuf import reflection as _reflection | |
| from google.protobuf import symbol_database as _symbol_database | |
| from google.protobuf import descriptor_pb2 |