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 ( | |
"crypto/x509" | |
"encoding/pem" | |
"log" | |
) | |
func main() { | |
pemData := []byte(chain) |
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
#!/usr/bin/perl | |
while(<>) { | |
chomp; | |
if(/^(\S+):(\d+): [^:]+: (.+) should be (.+)/) { | |
print "B $1\n"; | |
$old = $3; | |
$new = $4; | |
$line = $2; | |
$old =~ s/([()+])/\\$1/g; |
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 | |
# Usage: buildall [-e] [-cmp] [-work] | |
# | |
# Builds everything (std) for every GOOS/GOARCH combination but installs nothing. | |
# | |
# By default, runs the builds with -toolexec 'toolstash -cmp', to test that the | |
# toolchain is producing bit identical output to a previous known good toolchain. | |
# | |
# Options: |
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 "bytes" | |
var utab = []struct { | |
v, n uint16 | |
}{ | |
{0x00C0, 0x0041}, | |
{0x00C1, 0x0041}, | |
{0x00C2, 0x0041}, |
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" | |
"math" | |
"strconv" | |
) | |
func ftoa(f float64, prec int) string { | |
fr, exp := math.Frexp(f) |
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/sh | |
set -e | |
root=$(hg root) | |
if [ $# = 0 ]; then | |
for i in $(ls $root/.hg/codereview/cl.* 2>/dev/null) | |
do | |
n=$(echo $i | sed 's/.*cl.//') | |
desc=$(sed -n '/^Description:/,$p' $i | sed -n 2p) | |
echo +$n' '$desc |
NewerOlder