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
// https://github.com/lestrrat-go/jwx/blob/129e8b1d3bc86038ded5b41e8720b120194074f8/examples/jwk_parse_key_example_test.go | |
package examples_test | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
"github.com/lestrrat-go/jwx/v2/jwk" | |
) |
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
// https://github.com/lestrrat-go/jwx/blob/129e8b1d3bc86038ded5b41e8720b120194074f8/examples/jwt_builder_example_test.go | |
package examples_test | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
"github.com/lestrrat-go/jwx/v2/jwt" | |
) |
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 examples_test | |
import ( | |
"fmt" | |
"net/http" | |
"net/url" | |
"strings" | |
"github.com/lestrrat-go/jwx/v2/jwt" | |
) |
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
#!perl | |
# perl ripple.pl $ref $delta file.sbv | |
use strict; | |
use POSIX qw(floor); | |
# $ref is the time code (in seconds) where the ripple should start | |
my $ref = shift @ARGV; |
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
lestrrat@finch bench % benchstat -sort -delta stdlib.txt v0.4.2.txt | |
name old time/op new time/op delta | |
JWK/Serialization/RSA/PrivateKey/jwk.Parse-8 50.0µs ± 1% 15.8µs ± 8% -68.40% (p=0.008 n=5+5) | |
JWK/Serialization/RSA/PrivateKey/jwk.ParseString-8 50.4µs ± 1% 18.5µs ±15% -63.23% (p=0.008 n=5+5) | |
JWK/Serialization/EC/PrivateKey/jwk.Parse-8 15.6µs ± 1% 5.8µs ± 5% -63.11% (p=0.008 n=5+5) | |
JWK/Serialization/EC/PrivateKey/jwk.ParseString-8 15.9µs ± 3% 5.9µs ± 2% -62.64% (p=0.008 n=5+5) | |
JWK/Serialization/RSA/PrivateKey/jwk.ParseReader-8 50.9µs ± 1% 19.2µs ± 6% -62.31% (p=0.008 n=5+5) | |
JWK/Serialization/EC/PrivateKey/jwk.ParseReader-8 15.7µs ± 1% 6.0µs ± 4% -61.50% (p=0.008 n=5+5) | |
JWS/Serialization/JSON/jws.Parse-8 21.1µs ± 1% 8.3µs ± 2% -60.65% (p=0.008 n=5+5) | |
JWS/Serialization/JSON/jws.ParseString-8 21.3µs ± 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
# | |
# Preparation: | |
# | |
# 1. Install perl5, cpanm | |
# 2. cpanm -L local -n Text::CSV_XS | |
# | |
# Execution: | |
# | |
# perl script.pl source.tsv | |
# |
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 strict; | |
use lib "local/lib/perl5"; | |
use Data::Dumper; | |
use Image::ExifTool qw(:Public); | |
use Time::Piece; | |
my $name = "___CHILD'S_NAME___"; | |
my @files; | |
for my $file (glob("*.jpg")) { |
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 | |
# Installs mariadb in Debian 9 GCP VM, creates self-signed certificates, | |
# sets up the server config, and restarts the mysql server | |
set -e | |
set -x | |
apt-get update | |
apt-get install -y mysql-server |
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
# App Engine Standard Go 1.9 migration to Go 1.11 | |
tag:["google-app-engine", "Go"] | |
Migrating from Go 1.9 to 1.11 in App Engine Standard isn't just a matter of updating Go itself - | |
it introduces a major update in the runtime itelf. Because of this, you can't just change your | |
code to work on Go 1.11 and expect it to be deployed properly. You will need to work on a few | |
more issues. | |
This article describes the new runtime known as the Google App Engine Standard 2nd Gen, |
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 | |
set -e | |
# Script to configure the healthcheck for ESP | |
# (ESP listens on a separate port from the main port for healthchecks) | |
SERVICE_NAME="This the name of your service that you proxy your requests to" | |
ESP_HEALTH_CHECK_PORT_NAME="This is the name of the port that ESP listens for health checks." | |
ESP_MAIN_PORT_NAME="This is the name of the port that ESP listens for the actual service." |
NewerOlder