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 main | |
import ( | |
"os" | |
) | |
import ( | |
"io" | |
"log/slog" | |
"path/filepath" |
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
all: test build | |
COMMANDS = $(notdir $(wildcard cmd/*)) | |
BINARIES = $(addprefix build/,$(COMMANDS)) | |
${BINARIES}: $(shell find . -name '*.go') go.mod go.sum | |
@mkdir -p build | |
go get ./... | |
go build -o build ./... |
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
// Go Playground: https://go.dev/play/p/ao7M54vTDRQ | |
package main | |
import ( | |
"os" | |
"strings" | |
"golang.org/x/net/html" | |
) |
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 main | |
import ( | |
"fmt" | |
"google.golang.org/protobuf/proto" | |
// type proto.Message interface { .... | |
// func proto.Merge(dst, src Message) | |
"[...]/foo" | |
// syntax = "proto3"; | |
// message Foo { |
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
get_boolean_value_from_json() { | |
# Return true if the JSON file exists, the variable is set, and it | |
# evaluates as true in javascript. | |
test -f "$1" && osascript -l 'JavaScript' 2>&1 <<- EOF | |
ObjC.import('stdlib'); | |
$.exit(JSON.parse(\`$(cat "$1")\`).${2} ? 0 : 1); | |
EOF | |
} |
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 main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"strings" | |
) | |
func MuttSendFile(dstEmail, filePath string) error { |
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
/* | |
* Copyright 2017 Google Inc. | |
* | |
* Use of this source code is governed by a BSD-style license that can be | |
* found in the LICENSE file. | |
*/ | |
/* | |
## build.ninja ## | |
PNGD = /home/halcanary/src/skia/third_party/libpng | |
cflags = -I$PNGD |
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
// Copyright 2019 Google LLC. | |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | |
#include "skia.h" | |
#include "SkShaper.h" | |
#include <iostream> | |
#include <string> | |
int main() { | |
constexpr int kWidth = 1080; | |
constexpr int kXMargin = 40; | |
constexpr int kYMargin = 40; |
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 "SkFontTypes.h" | |
#include <cstddef> | |
class SkFont; | |
class SkTextBlob; | |
template<typename T> class sk_sp; | |
sk_sp<SkTextBlob> SkShapeText(const void* text, | |
size_t byteLength, | |
const SkFont& font, | |
SkTextEncoding encoding = kUTF8_SkTextEncoding); |
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
/* | |
Idea: put all of the primitive-shaping functions in a single place in our API. | |
This will make clear that the NONE of these functions do what you expect them | |
to do. | |
*/ | |
// Copyright 2019 Google LLC. | |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | |
#ifndef SkSimpleShaper_DEFINED | |
#define SkSimpleShaper_DEFINED |
NewerOlder