Skip to content

Instantly share code, notes, and snippets.

View mnichols's full-sized avatar

Mike Nichols mnichols

View GitHub Profile
@mnichols
mnichols / schema.graphql
Created March 27, 2019 04:48
GraphQLSchema
schema {
query: Query
mutation: Mutation
}
enum InstallStrategy {
APP
ASSET
}
body={
"total":4,
"assets":[
{
"path":"/assets/A_UUhjcVpLdFltdXhqSXV6QjDvvitMWxeJj6F2ZhPDh8w35-MlPpIH47rTUPbms9QvLQlz5dq06Q0T8KSU5MS4fRLo9F0i90RoMMdZOkONU6Hgxi7qRHd1h5-XPuOHlvWDi1fq4frLnQI5JhkcqcZvkINhe3oYye5D64Dv5astyaU\u003d",
"assetKey":"cjcjeoi2w0000rn35c23q98ou-Bee-1.1.0-cjpx1fp340008a473ie51soqm1528569",
"url":"https://assets.local.invision.works/assets/A_UUhjcVpLdFltdXhqSXV6QjDvvitMWxeJj6F2ZhPDh8w35-MlPpIH47rTUPbms9QvLQlz5dq06Q0T8KSU5MS4fRLo9F0i90RoMMdZOkONU6Hgxi7qRHd1h5-XPuOHlvWDi1fq4frLnQI5JhkcqcZvkINhe3oYye5D64Dv5astyaU\u003d",
"expiresAt":"2018-12-21 12:00:00"
},
{
@mnichols
mnichols / trace.sh
Last active December 19, 2018 22:57
marketplace-api | 22:54:04 app | 10:54PM DBG request_completed bytes_in= bytes_out=440 calling_service=marketplace-bff elapsed_ms=0 host=i.local.invision.works method=GET proto=HTTP/1.1 request_id=rid request_source=postman status_code=200 url=/api
marketplace-api | 22:54:04 app | 10:54PM DBG incoming body="{\"assets\":[],\"author\":{\"name\":\"Bee Wilkerson\",\"email\":\"[email protected]\"},\"bannerImage\":\"/dupe1.png\",\"contributors\":[],\"description\":\"Here is a app\",\"displayName\":\"Here is a descriptino of the app\",\"icon\":\"\",\"id\":\"cjpvrxk3c0005a473a6ja0i8g\",\"screenshots\":[\"/dupe1.png\",\"/promo1.png\",\"/promo2.png\"],\"socialUrls\":[],\"tagline\":\"Here is a tagline\"}" calling_service=marketplace-bff request_id=rid request_source=postman
marketplace-api | 22:54:04 app | 2018/12/19 22:54:04 HTTP Request url=http://assets-api/v1/protected/assets?public=true method=POST
marketplace-api | 22:54:04 app | 2018/12/19 22:54:04 HTTP Response:
market
@mnichols
mnichols / getMousePosition.js
Created March 20, 2018 16:22 — forked from branneman/getMousePosition.js
getMousePosition(event) - cross browser normalizing of: clientX, clientY, screenX, screenY, offsetX, offsetY, pageX, pageY
/**
* @param {Event} evt
* @return {Object}
*/
function getMousePosition(evt) {
var pageX = evt.pageX;
var pageY = evt.pageY;
if (pageX === undefined) {
pageX = evt.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
error /var/www/console-ui-v7/node_modules/pngcrush-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: /var/www/console-ui-v7/node_modules/pngcrush-bin
Output:
internal/child_process.js:330
throw errnoException(err, 'spawn');
^
func (this *Identity) UnmarshalJSON(data []byte) error {
type Alias Identity
aux := &struct {
*Alias
UserID int `json:"user_id"`
TeamID int `json:"team_id"`
}{
Alias: (*Alias)(this),
}
if err := json.Unmarshal(data, &aux); err != nil {
@mnichols
mnichols / incidentcause.md
Last active December 5, 2017 06:24
incident cause

Terms to lookup: -"Handler failed" this is the composed events handler error prefix

  • "Emailer" this is the notifications ''' {"level":"error","timestamp":"2017-12-04T20:05:40.109Z","logger":"conversations-service.notifications.email_unreads","caller":"notifications/email_unreads.go:109","msg":"Email batch failed","owner":"red","service":"conversations-service","error":"0 Emails failed to be sent","stacktrace":"github.com/InVisionApp/conversations-service/vendor/go.uber.org/zap.Stack\n\t/go/src/github.com/InVisionApp/conversations-service/vendor/go.uber.org/zap/field.go:191\ngithub.com/InVisionApp/conversations-service/vendor/go.uber.org/zap.(*Logger).check\n\t/go/src/github.com/InVisionApp/conversations-service/vendor/go.uber.org/zap/logger.go:301\ngithub.com/InVisionApp/conversations-service/vendor/go.uber.org/zap.(*Logger).Error\n\t/go/src/github.com/InVisionApp/conversations-service/vendor/go.uber.org/zap/logger.go:202\ngithub.com/InVisionApp/conversations-service/notifications.(*unreadsEmailer).handl
def clean_slate(record, name)
name_parts = name.split(/\s+/)
name_parts.each do |part|
record.gsub!(/\b#{part}\b/i,"XX" * name.length)
end
return record
end
{
"identity": {
"id": "147d2194-8045-4084-5c43-94abaaf1804a",
"name": "noworky",
"authorId": 1,
"edition": 1,
"pageId": "eb842147-5e40-4773-bfb8-d04a0782500b",
"thumbnailUrl": "https://in.local.invision.works/assets/user_1_presentation_147d2194-8045-4084-5c43-94abaaf1804a_thumbnails_edition_1_76ccc4ce07acd3fa7ea1798b3fcc6e52f7bd9f30"
},
"permissions": {
/* global beforeEach describe it */
import { assert } from 'chai'
import m from 'mithril'
import mq from 'mithril-query'
import stream from 'mithril/stream'
import { compute, connect, scope, combine } from '../src/index.js'
function SimpleComponent ({ update }) {
return {