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" | |
"reflect" | |
"unsafe" | |
"go.temporal.io/sdk/worker" | |
"golang.org/x/time/rate" | |
) |
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
# By default KeyDB does not run as a daemon. Use 'yes' if you need it. | |
# Note that KeyDB will write a pid file in /var/run/keydb.pid when daemonized. | |
daemonize no | |
bind 127.0.0.1 ::1 # listens on loopback IPv4 and IPv6 | |
bind {{ env "NOMAD_IP_redis" }} | |
aclfile {{ env "NOMAD_SECRETS_DIR" }}/users.acl | |
# By default protected mode is enabled. You should disable it only if |
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
job "keydb-vanilla" { | |
region = "global" | |
datacenters = ["dc1"] | |
type = "service" | |
group "keydb" { | |
count = 1 | |
vault { | |
policies = ["nomad-keydb"] |
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 | |
# Configures Vault's OIDC authentication method to use Google as the provider. | |
# It retrieves the client ID and client secret from Vault, formats the GSuite service account | |
# JSON as required by Vault, and writes the configuration to Vault using the "gsuite" provider. | |
# This script assumes that Vault has already been initialized and unsealed, and that the OIDC | |
# authentication method has been enabled. | |
# Write first your Google Cloud Platform (GCP) credentials to HashiCorp Vault using |
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 | |
# Write Google Cloud Platform (GCP) credentials to HashiCorp Vault | |
# https://gist.github.com/zboralski/709b2427bff863ab7868c6a1d2125591#file-vault-oidc-google-secrets-sh | |
# Then use vault-oidc-google-secrets.sh to configure OIDC | |
# https://gist.github.com/zboralski/8f44f9a3ece6cd01fbc675943b490a80#file-vault-oidc-google-config-sh | |
# Set project name and file names | |
PROJECT="example-vault-us" |
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
// no-copy conversion from []byte to string #25484 | |
// https://github.com/golang/go/issues/25484#issuecomment-391415660 | |
func ByteSlice2String(bs []byte) string { | |
return *(*string)(unsafe.Pointer(&bs)) | |
} |
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 ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"golang.org/x/exp/mmap" |
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
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.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
// Requires SASS >= 3.3 and responsive.scss | |
// https://gist.github.com/maxluster/168e650267bac9faaafd | |
// | |
// Scale value with $width for each $width in $named-breakpoints map. | |
// Usage : @include responsive("font-size", $base-font-size + px, | |
// resp-scale($base-width, $base-font-size)); | |
@function resp-scale($width, $value, $scale-up: false) { | |
$m : (); | |
@each $k, $v in $named-breakpoints { | |
$ok : true; |
NewerOlder