Skip to content

Instantly share code, notes, and snippets.

Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
// const extend = require('zigbee-herdsman-converters/lib/extend');
// const ota = require('zigbee-herdsman-converters/lib/ota');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
// const utils = require('zigbee-herdsman-converters/lib/utils');
// const globalStore = require('zigbee-herdsman-converters/lib/store');
@steinuil
steinuil / README.md
Created October 19, 2022 12:24
Elevator Saga

TypeScript template for https://play.elevatorsaga.com/.

Simply download all the gist files and open up in VS code and you'll get type checking.

To run a solution simply copy the whole content of the JS file and paste it into the website.

type round =
| Down
| Up
| Half_up
| Half_down
| Half_even
| Ceiling
| Floor
| Zero_five_up
@steinuil
steinuil / Nuget2Nix.fsx
Last active May 23, 2023 21:39
Code for the .NET packaging post
open System
open System.IO
open System.Net
open System.Text.Json
open System.Collections.Generic
open System.Security.Cryptography
/// Taken from hash.cc in the nix codebase
/// https://github.com/NixOS/nix/blob/a7540294cfae82c098e8691cd5212a9184add574/src/libutil/hash.cc
module Base32 =
# You have two options to run this script:
# - Run with powershell (smol brain):
# You save the script somewhere and then you right click on it and select "Run with PowerShell".
# You'll have to right click every time you want to run it, and you'll get an ugly blue powershell window every time.
# If you choose this method, you must have small brain.
# You might as well just watch the damn vtuber stream on youtube as befitting of somebody of your intellectual stature.
# - Convert to exe (big brain):
# You download this shit:
# https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-GUI-Convert-e7cb69d5
# Then you're on your own. You should be able to solve this.
open Ppxlib
module B = Ast_builder.Default
let contains_jsx : attributes -> bool =
List.exists (function
| { txt = "JSX"; _ }, _ -> true
| _ -> false
)
@steinuil
steinuil / Visual Studio
Last active June 7, 2019 09:29
Tizen build log
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
Restoring packages for C:\Code\Twet\Twet.Tizen\Twet.Tizen.fsproj...
Committing restore...
Generating MSBuild file C:\Code\Twet\Twet.Tizen\obj\Twet.Tizen.fsproj.nuget.g.props.
Generating MSBuild file C:\Code\Twet\Twet.Tizen\obj\Twet.Tizen.fsproj.nuget.g.targets.
Writing lock file to disk. Path: C:\Code\Twet\Twet.Tizen\obj\project.assets.json
Restore completed in 30.46 ms for C:\Code\Twet\Twet.Tizen\Twet.Tizen.fsproj.
NuGet package restore finished.
1>------ Build started: Project: Twet.Tizen, Configuration: Debug Any CPU ------
local function system(cmd)
local proc = io.popen(cmd)
local body = proc:read('*all')
local ok = proc:close()
return ok, body
end
local function trim(str)
str = str:gsub('^%s+', '')
local function message(msg)
print(msg)
mp.osd_message(msg)
end
local function get_platform()
local o = {}
if mp.get_property_native('options/vo-mmcss-profile', o) ~= o then
return 'windows'