This file contains hidden or 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
(?x) | |
(?<return-type> | |
(?<type-name> | |
(?: | |
(?:ref\s+(?:readonly\s+)?)? | |
(?: | |
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? | |
(?<name-and-type-args> | |
\g<identifier>\s* | |
(?<type-args>\s*<(?:[^<>]|\g<type-args>)+>\s*)? |
This file contains hidden or 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
#MaxThreadsPerHotkey 3 | |
F1:: | |
Toggle := !Toggle | |
Loop | |
{ | |
If (!Toggle) | |
Break | |
Click down | |
Sleep 850 |
This file contains hidden or 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 | |
{ | |
NOP, | |
ADD | |
}; | |
struct thestack { | |
union { | |
int i; |
This file contains hidden or 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
var rarity = new [] { 5000, 2000, 1000, 500, 100 }; | |
int[] dispenser_action(int sum) | |
{ | |
if (sum % rarity.OrderBy(x => x).First() != 0) | |
throw new Exception(); | |
var result = new List<int>(); | |
foreach (var r in rarity) | |
{ | |
var x = (sum - (sum % r)) / r; | |
result.AddRange(Enumerable.Range(0, x).Select(_ => r)); |
This file contains hidden or 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor; | |
using System.Linq; | |
using System.IO; | |
public class CubemapTextureBuilder : EditorWindow | |
{ | |
[MenuItem("Tools/Cubemap Builder")] |
This file contains hidden or 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 class HookFx<T> where T : Delegate | |
{ | |
private readonly nint _original; | |
private readonly T _target; | |
private byte[] _originalByteCode = new byte[0]; | |
private bool isInstalled; | |
public HookFx(nint original, T target) | |
{ | |
_original = original; | |
_target = target; |
This file contains hidden or 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; |
This file contains hidden or 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 hidden or 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 |