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
/// Guards a scope against unwinding, calling a handler if unwinding occurs. | |
/// | |
/// - Handler gets no panic info; limited to `Fn()` | |
/// - Not reentrant; handler panics may cause program abort | |
/// - Intended for single scope; don't store or share | |
/// - Ineffective with panic=abort | |
pub struct UnwindDetector<T: Fn()> { | |
handler: T, | |
} |
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
function fp_to_bytes(fp, bytes, is_double) | |
local val = tonumber(fp) | |
-- it's a NaN or inf | |
if val ~= val or val == math.huge or val == -math.huge then | |
bytes[1] = (val ~= val or val == math.huge) and 0x7f or 0xff | |
bytes[2] = (val ~= val and 0xf9 or 0xf8) | |
local max = is_double and 8 or 4 | |
for i = 3, max do | |
bytes[i] = 0 |
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
Run in MappingTest subdirectory of https://github.com/MinimallyCorrect/Mapping/tree/transform-only-runs-for-default-attr | |
Must run publishToMavenLocal in parent directory first. | |
Note how transform only runs in test case -PTEST=3 where the default value of the attr can be transformed to the requested value. | |
Even case 4 fails which is where the default value is set as in case 3, but a value the same as that default value is also set in the gradle module metadata. | |
$ for i in 0 1 2 3 4; do echo; echo "Testing with -PTEST=$i"; echo; ./gradlew.bat -PTEST=$i --no-build-cache build; done | |
Testing with -PTEST=0 |
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
// ==UserScript== | |
// @name PluralSight Wider Speed Range | |
// @namespace https://nyx.nova.fail/ | |
// @version 1.1 | |
// @description Faster pluralsight video maximum speed | |
// @author Luna | |
// @match https://app.pluralsight.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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
#!/usr/bin/env bash | |
# This script boots the first linux it finds in a grub config on any available mount point | |
# using kexec | |
DEBIAN_FRONTEND=noninteractive sudo apt-get -q -y install kexec-tools | |
set -euvo pipefail | |
parts=$(sudo blkid | grep -v /dev/loop | sort | cut -d: -f 1) | |
grub_paths="/boot/grub/grub.cfg /grub/grub.cfg /boot/grub.cfg" |
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
Enclosure serial console commands | |
COMMANDS: | |
Note: Not all commands are supported, 'help' lists supported commands. | |
acfail_sim Simulate AC Fail condition | |
auto_iic_recovery Enable/disable the automatic bus recovery. | |
batt_cell_balance Override auto cell balancing by individually turning on/off the balance FET s | |
batt_clear_cell_fault_poh Clear the Power On Hours stored as a result of a >500mV cell imbalance fault |
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
Jul 11 09:22:21 dhclient[87943]: exiting. | |
Jul 11 09:22:21 dhclient[87943]: connection closed | |
Jul 11 09:22:13 dhclient[27206]: em2 link state up -> down | |
Jul 11 09:21:26 dhclient[73751]: bound: renewal in 190763 seconds. | |
Jul 11 09:21:26 dhclient: Deleting old routes | |
Jul 11 09:21:26 dhclient: Comparing Routers: Old: <FLAPPING GATEWAY IP> New: <FLAPPING GATEWAY IP> | |
Jul 11 09:21:26 dhclient: Comparing IPs: Old: <FLAPPING WAN IP> New: <FLAPPING WAN IP> | |
Jul 11 09:21:26 dhclient: Starting delete_old_states() | |
Jul 11 09:21:25 dhclient: New Routers (em2): <FLAPPING GATEWAY IP> | |
Jul 11 09:21:24 dhclient: New Routers (em2): <FLAPPING GATEWAY IP> |
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
# strace -x -s 256 -p 1957 -p 1958 | |
Process 1957 attached - interrupt to quit | |
Process 1958 attached - interrupt to quit | |
[pid 1958] rt_sigsuspend([] <unfinished ...> | |
[pid 1957] rt_sigsuspend([] <unfinished ...> | |
[pid 1958] <... rt_sigsuspend resumed> ) = ? ERESTARTNOHAND (To be restarted) | |
[pid 1958] --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- | |
[pid 1958] sigreturn() = ? (mask now []) | |
[pid 1958] rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0 | |
[pid 1958] rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 |
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
rdrand stressor will be skipped, not a recognised Intel CPU. | |
tsc stressor will be skipped, not a recognised Intel CPU. | |
disabled 'cpu-online' as it may hang the machine (enable it with the --pathological option) | |
dispatching hogs: 16 af-alg, 16 atomic, 16 branch, 16 bsearch, 16 cache, 16 context, 16 cpu, 16 crypt, 16 fp-error, 16 funccall, 16 getrandom, 16 heapsort, 16 hsearch, 16 icache, 16 ioport, 16 lockbus, 16 longjmp, 16 lsearch, 16 malloc, 16 matrix, 16 membarrier, 16 memcpy, 16 mergesort, 16 nop, 16 numa, 16 opcode, 16 qsort, 16 radixsort, 16 str, 16 stream, 16 tree, 16 tsearch, 16 vecmath, 16 wcs, 16 zlib | |
stress-ng-numa: system has 1 of a maximum 1024 memory NUMA nodes | |
stress-ng-stream: stressor loosely based on a variant of the STREAM benchmark code | |
stress-ng-stream: do NOT submit any of these results to the STREAM benchmark results | |
stress-ng-stream: Using CPU cache size of 8192K |
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
#include "events.h" | |
OurCameraEventHandler g_ourCameraEventHandler; | |
OurActionEventHandler g_ourActionEventHandler; | |
OurNiNodeUpdateEventHandler g_ourNinodeEventHandler; | |
bool Events::Hook(SKSEMessagingInterface* iface) { | |
_MESSAGE("Events::Hook AddEventSink"); | |
EventDispatcher<SKSEActionEvent> * aed = (EventDispatcher<SKSEActionEvent> *)iface->GetEventDispatcher(SKSEMessagingInterface::kDispatcher_ActionEvent); | |
aed->AddEventSink(&g_ourActionEventHandler); |
NewerOlder