This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const string VERSION = "42.1.2"; | |
const string DATE = "2021/09/12"; | |
const string INI_SECTION_GENERAL = "Auto Door and Airlock - General Config"; | |
const string INI_GENERAL_ENABLE_AUTO_DOORS = "Enable automatic door closing"; | |
const string INI_GENERAL_ENABLE_AIRLOCK = "Enable airlock system"; | |
const string INI_GENERAL_IGNORE_ALL_HANGAR_DOORS = "Ignore all hangar doors"; | |
const string INI_GENERAL_REGULAR_DOOR_OPEN_TIME = "Default regular door auto close time (s)"; | |
const string INI_GENERAL_HANGAR_DOOR_OPEN_TIME = "Default hangar door auto close time (s)"; | |
const string INI_GENERAL_DOOR_EXCLUDE_NAME = "Auto door exclusion name tag"; | |
const string INI_GENERAL_INTERIOR_DOOR_NAME = "Interior airlock door name tag"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Instructions { | |
NOP, // nope operation | |
ADD, // addtive operation (sum two stack values) | |
SUB, // substract | |
DIV, // divide | |
MUL, // multiple | |
LD_ARGS, // load from args into stack (load data value with offset from args into stack) | |
LDS_NUM, // load constant value into stack | |
RET // return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Python.Runtime; | |
PythonEngine.Initialize(); | |
using var _ = Py.GIL(); | |
var np = Py.Import("numpy"); | |
var polyfit = np.polyfit; | |
var poly1d = np.poly1d; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal interface IObserverLinkedList<T> | |
{ | |
void UnsubscribeNode(ObserverNode<T> node); | |
} | |
internal sealed class ObserverNode<T> : IObserver<T>, IDisposable | |
{ | |
private readonly IObserver<T> observer; | |
private IObserverLinkedList<T> list; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ping -c 1 10.10.10.254 &> /dev/null | |
then | |
if [ ! -f /tmp/cpu.up.status ]; then | |
cpupower frequency-set -u 3200Mhz | |
touch /tmp/cpu.up.status | |
if [ -f /tmp/cpu.down.status ]; then | |
rm -rf /tmp/cpu.down.status | |
fi | |
fi | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EnumCache<T> | |
{ | |
public class Cache<X> | |
{ | |
public Array Values { get; } | |
public object[] UnderlyingValues { get; } | |
public int TotalValues { get; } | |
public Type UnderlyingType { get; } | |
public Type SelfType => typeof(X); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public unsafe class FluidSystem : IFluidSystem, IDisposable | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dec/14/2022 04:17:05 by RouterOS 7.7rc1 | |
# software id = XH5D-E1DZ | |
# | |
# model = RB2011UiAS-2HnD | |
# serial number = HCN087QV7D1 | |
/interface bridge add admin-mac=18:FD:74:20:D9:C2 auto-mac=no comment=defconf name=bridge | |
/interface wireless set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX disabled=no distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid="BlackBox 2G" wireless-protocol=802.11 | |
/interface list add comment=defconf name=WAN | |
/interface list add comment=defconf name=LAN | |
/interface wireless security-profiles set [ find default=yes ] authentication-types=wpa2-psk mode=dynamic-keys supplicant-identity=MikroTik |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Generate(Vector3 localUp = Vector3.up) | |
{ | |
var axisA = new Vector3(localUp.y, localUp.z, localUp.x); | |
var axisB = Vector3.Cross(localUp, axisA); | |
for (var y = 0; y < Resolution; y++) | |
for (var x = 0; x < Resolution; x++) | |
{ | |
var percent = new Vector2(x, y) / (Resolution - 1); | |
var pointOnUnitCube = localUp + (percent.x - .5f) * 2 * axisA + (percent.y - .5f) * 2 * axisB; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using static NativeApi; | |
public class SplashScreen : IDisposable | |
{ | |
private ushort _wndClass; | |
private IntPtr _hwnd; | |
private const string CLASS_NAME = "SplashScreen"; | |
private Bitmap _bitmap; | |
private static HandleRef nullHandle = new HandleRef(null, IntPtr.Zero); | |
private WndProc? proc; |
NewerOlder