Discover gists
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
system_profiler SPSoftwareDataType -json | | |
jq --raw-output --argjson labels '[ "day", "hour", "minute", "second" ]' ' | |
.SPSoftwareDataType[0].uptime[3:] // empty | split(":") as $uptime | | |
def pprint: | |
($uptime[.] | tonumber) as $val | | |
if $val == 0 then empty else | |
"\($val) \($labels[.])" + (if $val == 1 then "" else "s" end) | |
end; |
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
{ | |
"description": "A Custom Theme for Prima C4 models", | |
"elements": [ | |
{ | |
"shape": "Person", | |
"tag": "Person" | |
}, | |
{ | |
"background": "#F2EAF8", | |
"color": "#8334c2", |
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
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>ThreadLocal</groupId> | |
<artifactId>ThreadLocal</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>SeleniumThreadLocal</name> | |
<dependencies> | |
<dependency> |
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
==> default: Running provisioner: shell... | |
[ERROR] An error occurred in the underlying SSH library that Vagrant uses. | |
[ERROR] The error message is shown below. In many cases, errors from this | |
[ERROR] library are caused by ssh-agent issues. Try disabling your SSH | |
[ERROR] agent or removing some keys and try again. | |
[ERROR] If the problem persists, please report a bug to the net-ssh project. | |
[ERROR] timeout during server version negotiating |
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
local wezterm = require("wezterm") | |
local act = wezterm.action | |
local config = {} | |
if wezterm.config_builder then config = wezterm.config_builder() end | |
config.color_scheme = "Tokyo Night" | |
config.font = wezterm.font_with_fallback({ | |
{ family = "IosevkaTerm Nerd Font", scale = 1.2} | |
}) | |
config.window_background_opacity = 0.9 |
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
javascript: (() => { | |
// Set some strings for the common result scenarios. | |
const support = "Page supports webmentions!"; | |
const noSupport = "Page does not support webmentions :("; | |
// Create a dialog element and insert into the DOM. | |
let d = document.createElement('dialog'); | |
document.getElementsByTagName('body')[0].appendChild(d); | |
// Remove the dialog element when it's closed. |
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
import mido | |
from time import sleep | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# MIDI note to value mapping dictionary | |
note_mapping = { | |
'C0': 12, 'C#0': 13, 'D0': 14, 'D#0': 15, 'E0': 16, 'F0': 17, 'F#0': 18, 'G0': 19, 'G#0': 20, 'A0': 21, 'A#0': 22, 'B0': 23, | |
'C1': 24, 'C#1': 25, 'D1': 26, 'D#1': 27, 'E1': 28, 'F1': 29, 'F#1': 30, 'G1': 31, 'G#1': 32, 'A1': 33, 'A#1': 34, 'B1': 35, | |
'C2': 36, 'C#2': 37, 'D2': 38, 'D#2': 39, 'E2': 40, 'F2': 41, 'F#2': 42, 'G2': 43, 'G#2': 44, 'A2': 45, 'A#2': 46, 'B2': 47, |
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
Log uploaded on Friday, May 3, 2024, 4:54:50 PM | |
Loaded mods: | |
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1) | |
Core(Ludeon.RimWorld): (no assemblies) | |
Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
Biotech(Ludeon.RimWorld.Biotech): (no assemblies) | |
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.3]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.3) | |
Enhanced Beliefs(smartkar.enhancedbeliefs): EnhancedBeliefs(1.0.0) | |
Active Harmony patches: |
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
packaging==23.1 | |
Requests==2.31.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
// SPDX-License-Identifier: AGPL-3.0-or-later | |
pragma solidity 0.7.5; | |
library EnumerableSet { | |
// To implement this library for multiple types with as little code | |
// repetition as possible, we write it in terms of a generic Set type with | |
// bytes32 values. | |
// The Set implementation uses private functions, and user-facing | |
// implementations (such as AddressSet) are just wrappers around the | |
// underlying Set. |