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
@@ func UseDefaultSevGuest() bool { | |
} | |
func message(d Device, command uintptr, req *labi.SnpUserGuestRequest) error { | |
- result, err := d.Ioctl(command, req) | |
- if err != nil { | |
- // The ioctl could have failed with a firmware error that | |
- // indicates a problem certificate length. We need to | |
- // communicate that specifically. | |
- if req.FwErr != 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
#!/bin/bash | |
# A script for explaining different parts of an enclave's signing material | |
function usage() { | |
echo >&2 | |
echo "Usage: $(basename "$0") [flags] <path_to_signing_material.dat>" >&2 | |
echo >&2 | |
echo " -c,--color=MODE: MODE is one of always, never, auto [default]." >&2 | |
echo " If in a tty, --color=auto produces color codes." >&2 |
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
#!/bin/bash | |
function executable() { | |
local name="$1" | |
cat > "${name}.cc" <<EOF | |
#include <cstdlib> | |
#include <iostream> | |
int main(int argc, char *argv[]) { | |
std::cout << "${name}\n"; |
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
### Keybase proof | |
I hereby claim: | |
* I am deeglaze on github. | |
* I am deeglaze (https://keybase.io/deeglaze) on keybase. | |
* I have a public key ASBRdo0rzlQWKjZkWSr39Saz0sooRmEU9KOVfkgmLAwGrgo | |
To claim this, I am signing this object: |
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
#lang racket | |
(require pict racket/draw) | |
;; Not exported by pict/private/utils.rkt | |
(define (draw-shape/border w h draw-fun | |
color [border-color #f] [border-width #f] | |
#:draw-border? [draw-border? #t] | |
#:transparent? [transparent? #f]) | |
(dc (λ (dc dx dy) | |
(define old-brush (send dc get-brush)) |
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
#lang racket | |
(require pict/color) | |
(provide | |
(contract-out | |
[cat-silhouette | |
(->i ([width positive?] [height positive?]) | |
(#:left-ear-extent [left-ear-extent (>=/c 0)] | |
#:left-ear-arc [left-ear-arc (real-in 0 (* 2 pi))] | |
#:left-ear-angle [left-ear-angle (real-in 0 (* 2 pi))] |
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
#lang racket | |
(require (for-syntax racket/syntax | |
syntax/parse | |
racket/list | |
syntax/id-table | |
racket/match | |
syntax/struct | |
racket/struct-info)) | |
(provide mk-op-struct) |
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
(define (flatten x) | |
(cond | |
((pair? x) | |
(append (flatten (car x)) (flatten (cdr x)))) | |
((null? x) x) | |
(else (list x)))) | |
(flatten '((1 2) (((3 4 5))))) |
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
#lang racket | |
(require (for-syntax racket/struct-info)) | |
(define-values (s:p mkp recp refp setp) | |
(make-struct-type 'parent #f 1 0 #f)) | |
(define-values (s:c mkc recc refc setc) | |
(make-struct-type 'child s:p 1 0 #f)) | |
(define (refc0 c) (refc c 0)) | |
(define-syntax P 'gotcha!) | |
(define-syntax C | |
(make-struct-info (λ () |
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
;; multiplication distributes over addition test: (2 * (1 + 3)) = ((2 * 1) + (2 * 3)) | |
((lambda (plus) | |
((lambda (mult) | |
((lambda (pred) | |
((lambda (sub) | |
((lambda (church0) | |
((lambda (church1) | |
((lambda (church2) | |
((lambda (church3) | |
((lambda (true) |
NewerOlder