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 gist:c00a6b5b6e0ef5eb972e525c441fca63
Hi,
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
pimterry / resin-set-build-by-tags.js
Last active Apr 13, 2018
Set the build for a set of resin.io 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)
sdk.pine.patch({
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
fetch('https://skimdb.npmjs.com/registry/_changes?since=now&feed=continuous&filter=_view&view=app/updated')
.then((response) => response.body.pipe(process.stdout))
View fetch-get.js
fetch('https://xkcd.com/info.0.json')
.then((response) => response.json())
.then(console.log);
@pimterry
pimterry / .travis.yml
Created Dec 3, 2016
Travis config for running Bats tests
View .travis.yml
language: bash
script:
- ./test.sh
@pimterry
pimterry / notes-find-test.sh
Created Dec 3, 2016
A simple real bats test, using `run` to assert on status and output
View notes-find-test.sh
@test "Should show matching notes only if a pattern is provided to find" {
touch $NOTES_DIRECTORY/match-note1.md
touch $NOTES_DIRECTORY/hide-note2.md
run $notes find "match"
assert_success
assert_line "match-note1.md"
refute_line "hide-note2.md"
}
View gist:f375dc4859ec923530b778f6ebe111a6
git clone <your repo>
git submodule update --init --recursive
./test.sh
@pimterry
pimterry / dev.sh
Created Dec 3, 2016
Rerun all bats test automatically on change for quick dev feedback
View dev.sh
# Run this file (with 'entr' installed) to watch all files and rerun tests on changes
ls -d **/* | entr ./test.sh
@pimterry
pimterry / test.sh
Last active Dec 3, 2016
Run all bats tests
View test.sh
# Run this file to run all the tests, once
./test/libs/bats/bin/bats test/*.bats
View addition-test.bats
#!./test/libs/bats/bin/bats
load 'libs/bats-support/load'
load 'libs/bats-assert/load'
@test "Should add numbers together" {
assert_equal $(echo 1+1 | bc) 2
}
You can’t perform that action at this time.