Skip to content

Instantly share code, notes, and snippets.

429 Too Many Requests

Nick Craig-Wood ncw

429 Too Many Requests
View GitHub Profile
ncw /
Created Jul 21, 2020
Response to File System Interfaces for Go proposal

This is going to be a long reply based in my experiences with rclone: Rclone interfaces with 30ish different cloud providers and has some very similar interfaces so I feel like I might have something to contribute!

As part of rclone I have made very similar interfaces. In fact there are two, one lower level more matched to the typical things cloud storage systems can do (eg read as streams, use Range requests, not seek in writes) and one which is more general purpose which can do everything a normal file system can (eg seek while writing, ReadAt,

ncw /
Created Jun 12, 2017
ARM assembler converter, ARM style to Go style
#!/usr/bin/perl -w
use strict;
# Rough and ready conversion of arm style assembler to go style
# assembler. Note input is expected to be in lower case whereas
# output is in upper case.
while (<>) {
ncw /
Last active Mar 25, 2016
Reproduction for OneDrive file corruption

File corruption bug on onedrive

To reproduce, run the python program This needs the python onedrivesdk. This uploades the file goof.png repeatedly, to the root of your onedrive as 1.png, 2.png, etc.

If you run it after a while you'll see a size mis-match.

This means that the 97k file is apparently 200k. If you look in the web interface it also appears as 200k, however if you download it is

ncw /
Last active Mar 22, 2016
Notes on Backblaze B2 API after rclone integration

Notes on Backblaze B2 API after rclone integration

I've finished the first version of rclone integration (see and ).

rclone aims to be "rsync for cloud storage" - a command line tool just aimed at the mechanics of transporting files between cloud storage systems and the local disk.

Here are some notes on where I found parts of the API which could be

ncw /
Created May 28, 2015
Go compiler bug demo

Go compiler bug demo

Compiling this directory with go build you get

./e.go:4: TypeType.New undefined (type *Type has no field or method New)

Where if you look in t.go you can see that method is defined.

ncw / sort.go
Created Mar 10, 2015
A channel based quicksort.
View sort.go
// Channel based quicksort
// Just for fun!
// Interesting that you can make a quicksort without being able to
// index your input. It may be O(n log n) for comparisons but it is
// O(n) for channels and go routines so perhaps not the most efficient
// quicksort ever ;-)
// It also has the worst case complexity O(n²) if you feed it sorted
ncw / README.txt
Last active Dec 6, 2021 — forked from spikebike/client output
Client side certificates with go
View README.txt
This demonstrates how to make client side certificates with go
First generate the certificates with
Run the server in one terminal
go run server.go
ncw / cumul.go
Created Jul 24, 2012
Conversion of to Go
View cumul.go
// Code from
// Converted to Go by Nick Craig-Wood
// Runs in pretty much identical time to the "basic sum (C++-like)" code
package main
import (
View netperf_tcp_crr_reports.markdown

Reports for netperf's TCP_CRR test (i.e TCP accept() performance)

Below is list of results collected with netperf. The interesting value is TCP_CRR, it measures how fast it can TCP connect/request/response/receive. In short, the transaction rate. The test is used to simulate a normal HTTP/1.0 transaction. What's worrying is that this value has very low on Xen virtualized guests. Performance differences between bare metal and virtualization has been as high as 2-3x.