Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🍕

David Morrow dperrymorrow

💭
🍕
View GitHub Profile
@dperrymorrow
dperrymorrow / task.json
Created Jan 16, 2020
example paylaod for a task
View task.json
{
"health": 4,
"healthIndicator": "RED",
"scopeCanBeAdjusted": true,
"id": 60293,
"unitCurrency": null,
"projectId": 4051,
"baseCharge": null,
"minimumCharge": null,
"parentSequenceId": 7297,
View json-highlight.js
import { escape } from "lodash";
export default function(str, format = true) {
try {
// ensure that we got valid json here...
const obj = JSON.parse(str);
if (format) str = JSON.stringify(obj, null, 2);
str = _parseObj(obj, str);
// dont wrap with the parent tag till we are done...
return `<span class="json-markup">${str}</span>`;
@dperrymorrow
dperrymorrow / user-settings.json
Last active Dec 15, 2018
vscode settings.json
View user-settings.json
{
"window.zoomLevel": 1,
"editor.fontFamily": "LigaMonaco, Monaco, 'Courier New', monospace",
"editor.fontSize": 13,
"editor.lineHeight": 19,
"editor.renderLineHighlight": "all",
"editor.fontLigatures": true,
"atomKeymap.promptV3Features": true,
"editor.formatOnPaste": true,
"editor.folding": false,
View sampleTrack.js
context.commit("setPage", [
{
title: "hello there",
created_timestamp: "2018-06-06 22:23:48.324468-07",
updated_timestamp: "2018-06-06 22:23:48.324468-07",
targets: [{ lang: "en" }],
meta: {
user_assignment: {},
track: { songId: "sdfsdf", artistNames: [] },
},
@dperrymorrow
dperrymorrow / elsintrc.json
Created May 29, 2018
eslint configuration
View elsintrc.json
{
"root": true,
"parserOptions": {
"ecmaVersion": 8
},
"plugins": [
"prettier",
"unicorn",
"promise",
"html"
View eslint.json
{
"root": true,
"parserOptions": {
"ecmaVersion": 8
},
"plugins": [
"prettier",
"unicorn",
"promise"
],
View routeData.vue
<template lang="pug">
.user-edit(v-if="dataLoaded")
//- your data is ready
</template>
<script>
import TethysVue from "@welocalize/tethys-vue";
export default {
@dperrymorrow
dperrymorrow / test.js
Last active Aug 14, 2017
stubbing @welocalize/pantheon-api-sdk
View test.js
const test = require("ava");
const sinon = require("sinon");
const SDK = require("@welocalize/pantheon-api-sdk");
const getJwt = sinon.stub(SDK, "getJwt");
test("stubbing a success of getJwt", t => {
const payload = { data: "foobar" };
getJwt.returns(Promises.resolve(payload));
});
@dperrymorrow
dperrymorrow / git log
Created May 8, 2017
git log as yaml format
View git log
git log --format='-- %nsha: %H %nauthor: %an %nemail: %ae %ndata: %ar %nsubject: %s%nbody: %b'
View invoice.html
<div class="invoice-simple document">
<!-- Page 1 -->
<div class="page">
<header>
<img src="../../assets/images/park-logo.png"></img>
<div class="doc-type">ESTIMATE</div>
</header>
<footer>
<strong>Park IP Reference number:</strong>
You can’t perform that action at this time.