Skip to content

Instantly share code, notes, and snippets.

View euoia's full-sized avatar

James Pickard euoia

  • https://www.greendragonbungay.co.uk
  • Bungay, Suffolk, England
View GitHub Profile
@euoia
euoia / Little Till 2020-07-30-magenta.md
Last active July 30, 2020 13:49
Little Till Release 30 July 2020 [Magenta]

Summary

  • Updates to product page.
  • Interface tweaks.

Details

Table Service

  • The "Web Shop" link now only shows web product lines. To see table orders see the new "Service Dashboard" link.
@euoia
euoia / gist:d7caa6fa8e9b3cede52f4bb2491132e6
Created June 4, 2020 10:24
Appium javascript-webdriverio appium logs
[HTTP] --> POST /session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"iOS","automationName":"XCUITest","deviceName":"iPhone SE (2nd generation)","platformVersion":"13.5","app":"/Users/euoia/Code/appium/sample-code/apps/TestApp.app.zip"},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","automationName":"XCUITest","deviceName":"iPhone SE (2nd generation)","platformVersion":"13.5","app":"/Users/euoia/Code/appium/sample-code/apps/TestApp.app.zip"}}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- POST /session 404 1 ms - 50
[HTTP]
[HTTP] --> POST /session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"iOS","automationName":"XCUITest","deviceName":"iPhone SE (2nd generation)","platformVersion":"13.5","app":"/Users/euoia/Code/appium/sample-code/apps/TestApp.app.zip"},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","automationName":"XCUITest","deviceName":"iPhone SE (2nd generation)","platformVersion":"13.5","app":"/Users/euoia/Code/appium/sample
# Schema:
Post hasMany Threads
Thread hasMany Comments
# Problem
In this made up example, I'm selecting all posts, threads and comments that
have comments by a particular user. I'm not interested in the other threads, or
the other comments, just the Post data, Thread data and Comments for comments by
this user. In SQL this is easy:
@euoia
euoia / gist:796531f9f4e301ec1a9af18ff70cfb68
Created May 11, 2018 09:47
Overriding error message not working
email = models.EmailField(_("The Candidate's email address"),
max_length=255, unique=True, error_messages={'invalid': 'xxx.'})
#!/usr/bin/env node
const db = require('sqlite');
db.open('tiles.db')
.then(db => db.prepare('select data from TestTable'))
.then(qry => {
const insertAll = () => qry.get().then(row => {
if (!row) {
return;
}
return Promise.all(queues.map(q => {
return Promise.props({name: q, length: redis.llenAsync(q)});
}));
@euoia
euoia / gist:d3a9419dbaad02fb6dc3
Created March 5, 2016 13:03
A basic .tern-project
{
"libs": [
],
"plugins": {
"node": {}
}
}
@euoia
euoia / gist:458800be88d85f8547ee
Created March 5, 2016 12:43
Basic .eslintrc for node.js
{
"env": {
"es6": true,
"amd": true,
"commonjs": true,
"node": true
},
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
@euoia
euoia / gist:dede6355902611b2d1fc
Created February 28, 2016 15:06
stack trace missing full path
28 Feb 10:03:39 - Listening on port 8888
[Function]
TypeError: _user2.default.where(...).update is not a function
at routes.js:13:37
at Layer.handle [as handle_request] (/Users/jp/Code/proj/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/jp/Code/proj/node_modules/express/lib/router/route.js:131:13)
at /Users/jp/Code/proj/node_modules/body-parser/lib/read.js:129:5
at invokeCallback (/Users/jp/Code/proj/node_modules/raw-body/index.js:262:16)
at done (/Users/jp/Code/proj/node_modules/raw-body/index.js:251:7)
at IncomingMessage.onEnd (/Users/jp/Code/proj/node_modules/raw-body/index.js:308:7)
@euoia
euoia / gist:ca1d0272bff5932cef82
Created November 15, 2015 15:27
Basic ES2015 .babelrc
{
"presets": ["es2015"]
}