Skip to content

Instantly share code, notes, and snippets.

View thegecko's full-sized avatar
🦎
Codin'

Rob Moran thegecko

🦎
Codin'
View GitHub Profile
@thegecko
thegecko / private-gh-download.md
Last active August 3, 2021 20:07
Download asset from private repo release

List assets from latest release:

curl -L https://<GH_TOKEN>:@api.github.com/repos/<ORG>/<REPO>/releases/latest

Download asset using ID from list above:

curl -L -H 'Accept: application/octet-stream' https://:@api.github.com/repos///releases/assets/
@thegecko
thegecko / error.ts
Created August 20, 2020 16:17
Throwing a custom error in a TypeScript promise
export class RddiError extends Error {
constructor(public status: number) {
super();
}
}
export class TestHarness {
public async errorFunction(): Promise<void> {
throw new RddiError(12);
}
@thegecko
thegecko / docker-space.md
Created December 15, 2017 10:20
Docker space

Out of space?

$ /Applications/Docker.app/Contents/MacOS/qemu-img info ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2

Resize:

$ /Applications/Docker.app/Contents/MacOS/qemu-img resize ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/Docker.qcow2 +100G