Skip to content

Instantly share code, notes, and snippets.

Tim Perry pimterry

Block or report user

Report or block pimterry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View HTTP Toolkit CLA
# Contributor License Agreement
_Closely based on [the Ghost CLA](
By contributing your code to this project you grant HTTP Toolkit a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, transferable license under all of Your relevant intellectual property rights (including copyright, patent, and any other rights), to use, copy, prepare derivative works of, distribute and publicly perform and display the Contributions on any licensing terms, including without limitation: (a) open source licenses like the MIT license; and (b) binary, proprietary, or commercial licenses. Except for the licenses granted herein, You reserve all right, title, and interest in and to the Contribution.
You confirm that you are able to grant us these rights. You represent that You are legally entitled to grant the above license. If Your employer has rights to intellectual property t
View Batched REST

A Proposal for Batched REST

An alternative to both REST & GraphQL, combining the benefits of each, based on

Batch multiple related requests into one HTTP request, which can be sent once & processed once on the server-side, but otherwise keep all the benefits of REST & HTTP. This is one single raw HTTP request:

POST /batch
Content-Type: multipart/batch
View gist:c00a6b5b6e0ef5eb972e525c441fca63
I'm afraid I'm not interested in this position right now.
I would like to know how you're getting my details and what you're storing though. Under my rights from the GDPR, can you please tell me:
* what personal data you have collected about me?
* the source of this data?
* who you've shared it with, and under what basis?
* how this data is being used?
pimterry / resin-set-build-by-tags.js
Last active Apr 13, 2018
Set the build for a set of devices by matching tag metadata
View resin-set-build-by-tags.js
let APP_ID = ...;
let TAG_KEY = ...;
let TAG_VALUE = ...; // Remove this and its use below to ignore the value
let TARGET_ID = ...; // Build id (not commit hash)
resource: 'device',
options: {
filter: {
belongs_to__application: APP_ID,
View stream-npm-publishes.js
const fetch = require('node-fetch');
// Connect to the npm registry, and stream back results to the console every time a package is published
.then((response) => response.body.pipe(process.stdout))
View fetch-get.js
.then((response) => response.json())
pimterry / .travis.yml
Created Dec 3, 2016
Travis config for running Bats tests
View .travis.yml
language: bash
- ./
pimterry /
Created Dec 3, 2016
A simple real bats test, using `run` to assert on status and output
@test "Should show matching notes only if a pattern is provided to find" {
run $notes find "match"
assert_line ""
refute_line ""
View gist:f375dc4859ec923530b778f6ebe111a6
git clone <your repo>
git submodule update --init --recursive
pimterry /
Created Dec 3, 2016
Rerun all bats test automatically on change for quick dev feedback
# Run this file (with 'entr' installed) to watch all files and rerun tests on changes
ls -d **/* | entr ./
You can’t perform that action at this time.