func myFunc() (string, error) {
file, err := os.Open("data.json")
if err != nil {
return "", fmt.Errorf("open data.json: %w", err)
}
jsonData, err := io.ReadAll(file)
We are using BootGuard 1.0 in order to generate an Intel authorized Locality 3 PCR-0 measurement of the boot block, which is the self-measured root of trust for the PCR-2 measurements of Coreboot. That is, we are not using its verification feature, which would require to fuse the chip. Because there is no BootGuard profile without verification, we still have to use a dummy OEM Key for signing both the Key Manifest and the Boot Policy Manifest, so that we can get the PCR-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
open Lwt.Infix | |
module type S = | |
sig | |
module Mirage : Mirage_flow.S | |
type data = (Cstruct.t Mirage_flow.or_eof, Mirage.error) result | |
type t | |
val create : Mirage.flow -> t | |
val mirage_flow : t -> Mirage.flow | |
val read : |
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
package pinnerbenchmark | |
/* | |
inline void* ccall0() { | |
return NULL; | |
} | |
inline void* ccall1(void* p) { | |
return NULL; | |
} |
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 hotkey = require "hs.hotkey" | |
local window = require "hs.window" | |
local spaces = require "hs._asm.undocumented.spaces" | |
function getGoodFocusedWindow(nofull) | |
local win = window.focusedWindow() | |
if not win or not win:isStandard() then return end | |
if nofull and win:isFullScreen() then return end | |
return win | |
end |
- Maccy (Clipboard Manager)
- OTP Manager
- Rectangle
- Hammerspoon
Fluid- Docker
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
// Use if you want to force the software SPI subsystem to be used for some reason (generally, you don't) | |
// #define FASTLED_FORCE_SOFTWARE_SPI | |
// Use if you want to force non-accelerated pin access (hint: you really don't, it breaks lots of things) | |
// #define FASTLED_FORCE_SOFTWARE_SPI | |
// #define FASTLED_FORCE_SOFTWARE_PINS | |
#include <FastLED.h> | |
#include "rgbw.h" | |
// How many leds are in the strip? | |
#define NUM_LEDS 300 |
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 ( | |
"fmt" | |
"math" | |
"strings" | |
) | |
func printGammaTable(start, end int, gamma float64) { | |
g_s := strings.ReplaceAll(fmt.Sprintf("%1.1f", gamma), ".", "_") | |
fmt.Printf("\nconst uint8_t PROGMEM gamma_%s_%dto%d_table[] = {\n", g_s, start, end) | |
for x := 0; x < 256; 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
from __future__ import print_function | |
import hexchat | |
__module_name__ = "keep_dialogs" | |
__module_author__ = "ansiwen" | |
__module_version__ = "1" | |
__module_description__ = "Saves current dialogs for next start" | |
def unload_cb(userdata): | |
networks = {} |
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
open Mirage | |
let stack = generic_stackv4 default_network | |
let cond = conduit_direct stack | |
let http_srv = http_server @@ cond | |
let res_dns = resolver_dns stack |
NewerOlder