Skip to content

Instantly share code, notes, and snippets.

View bradfitz's full-sized avatar

Brad Fitzpatrick bradfitz

View GitHub Profile
goroutine 1711044 [running]:
camlistore.org/pkg/serverinit.dumpGoroutines(0x1431060, 0xc455cec0a0, 0xc45a2720f0)
/home/bradfitz/src/camlistore.org/tmp/build-gopath-nosqlite/src/camlistore.org/pkg/serverinit/serverinit.go:614 +0x6a
net/http.HandlerFunc.ServeHTTP(0x107e328, 0x1431060, 0xc455cec0a0, 0xc45a2720f0)
/home/bradfitz/go/src/net/http/server.go:1683 +0x3a
camlistore.org/pkg/auth.RequireAuth.func1(0x1431060, 0xc455cec0a0, 0xc45a2720f0)
/home/bradfitz/src/camlistore.org/tmp/build-gopath-nosqlite/src/camlistore.org/pkg/auth/auth.go:408 +0x7b
net/http.HandlerFunc.ServeHTTP(0xc46228b820, 0x1431060, 0xc455cec0a0, 0xc45a2720f0)
/home/bradfitz/go/src/net/http/server.go:1683 +0x3a
net/http.(*ServeMux).ServeHTTP(0xc420a09590, 0x1431060, 0xc455cec0a0, 0xc45a2720f0)
--- old.txt 2016-07-07 15:55:17.084234130 +0000
+++ new.txt 2016-07-07 15:55:12.520346946 +0000
@@ -63,7 +63,7 @@
e81c6738dc6d148d2e679f0bfe44564101e38a93 ./Europe/Guernsey
2671fb3accd23b41c20ac37babeef3a7ee03a491 ./Europe/Paris
a1572c069a79ae668dab83d0e5fa7adb1fa446d0 ./Europe/Tirane
-ea14203c5a8c08ea3e66be8d9a4dbf2df3aa844c ./Europe/Astrakhan
+0aa305d3a21f14aecc696aef169c5225307ceb99 ./Europe/Astrakhan
ac1f68538a3c8649bdbd0a2cb819bee3e449f907 ./Europe/Zagreb
934519d33afd17ab0b9970296ea91b7bb4e14057 ./Europe/Tallinn
package main
import (
"bufio"
"flag"
"log"
"os/exec"
"sort"
"strings"
)
package main
import (
"context"
"flag"
"fmt"
"log"
"strings"
"time"
$ debugnewvm --host=host-netbsd-8branch --run-build=netbsd-amd64-8branch
2017/08/04 04:17:59 Creating debug-temp-1501820279 (with VM image "netbsd-amd64-8branch")
2017/08/04 04:18:00 instance requested
2017/08/04 04:18:09 instance created
2017/08/04 04:18:09 got instance info
2017/08/04 04:18:09 About to hit http://10.240.0.21 to see if buildlet is up yet...
2017/08/04 04:18:14 client buildlet probe error: Get http://10.240.0.21: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2017/08/04 04:18:14 SERIAL: SeaBIOS (version 1.8.2-20170524_173944-google)
Total RAM Size = 0x0000000073300000 = 1843 MiB
CPUs found: 2 Max CPUs supported: 2
### Keybase proof
I hereby claim:
* I am bradfitz on github.
* I am bradfitz (https://keybase.io/bradfitz) on keybase.
* I have a public key ASABTC_SERWlKvkqtYFognnu9rC7mha3H7oXivPEBp6h7go
To claim this, I am signing this object:
@bradfitz
bradfitz / memcached.pl
Created March 1, 2018 21:53
First prototype version of memcached by @bradfitz, written in Perl, before the C version
#!/usr/bin/perl
#
# memory cache daemon
#
use strict;
use warnings;
use lib "$ENV{'LJHOME'}/cgi-bin";
use LJ::Cache;
use Getopt::Long;
Box: type "ftyp", size 24
- *heif.FileTypeBox: &{box:0xc0000941e0 MajorBrand:heic MinorVersion: Compatible:[mif1 heic]}
Box: type "meta", size 3956
- *heif.MetaBox, 8 children:
Box: type "hdlr", size 34
- *heif.HandlerBox: &{FullBox:{box:0xc0000942d0 Version:0 Flags:0} HandlerType:pict Name:}
Box: type "dinf", size 36
- *heif.DataInformationBox
Box: type "dref", size 28
- *heif.DataReferenceBox
@bradfitz
bradfitz / gist:8d803135606c3a222fdb6d9fb666b962
Created April 18, 2018 02:31
failing to enlarge a partition
Trying to enlarge a VM's LVM partition from 400GB to 800GB.
I gave it more disk from the hypervisor and had the kernel rescan the SCSI bus, which worked:
dmesg:
[3879444.655318] sd 0:0:0:0: [sda] 1677721600 512-byte logical blocks: (859 GB/800 GiB)
[3879444.655447] sda: detected capacity change from 429496729600 to 858993459200
Old values:
(*mbr.Table)(0xc000088360)({
Partitions: ([]*mbr.Partition) (len=4 cap=4) {
(*mbr.Partition)(0xc000092160)({
Bootable: (bool) true,
Type: (mbr.Type) 131,
Start: (uint32) 2048,
Size: (uint32) 497664,
StartCylinder: (uint8) 0,
StartHead: (uint8) 32,
StartSector: (uint8) 33,