Skip to content

Instantly share code, notes, and snippets.


Josh Taylor joshuataylor

View GitHub Profile
joshuataylor /
Created Oct 22, 2020
Parse dbt errors in github actions to display in github annotations
import json
import re
# Open the run_results.json, which contains results from the run or test run.
input_file = open('target/run_results.json')
json_array = json.load(input_file)
# If there is no errors, by default we just print a new line.
errors = "\n"
for item in json_array["results"]:
# Run and test have different syntaxes, this should cover them both.
View gist:111870e15b83ce29761efc9ac1b5c69d
So you have setup your API to accept CORS requests on certain paths on your API using [cors_plug]( or [corsica]( and you are wondering how you test this with ExUnit.
## Back to basics: Does the endpoint actually work?
Well the first thing to do is to check if your endpoint is actually working with CORS.
You can do this via cURL:
curl http://localhost:4000/api/posts -v -H "Origin:"
View gist:721954bd410df4bb302c53667f0ea580
foreach (var item in items)
var message = new Foobar();
await Task.WhenAll(tasks).ConfigureAwait(false);
joshuataylor / app.js
Created Oct 23, 2017
Preact component to notify user when a change has been made, and on route change reload the page.
View app.js
import { h, Component } from 'preact';
import { Router } from 'preact-router';
import Header from './header';
import Home from '../routes/home';
import Profile from '../routes/profile';
import NotifyChange from "./NotifyChange/index";
// import Home from 'async!../routes/home';
// import Profile from 'async!../routes/profile';
View gist:a55e7dcb49838c0868227a2682a701ed
- checkout
- restore_cache:
- project-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}
- run:
name: deps
command: MIX_ENV=test mix deps.get
- run:
name: compile test
View gist:60348be4921994e6f494db89aa110a53
def create(conn, %{"grant_type" => "password",
"username" => username,
"password" => password}) do
try do
user = User
|> where(username: ^username)
|> where(active: true)
cond do
View controllers.application.js
import Ember from 'ember';
import AdultValidations from '../validations/adult';
import ChildValidations from '../validations/child';
import { reservedEmails } from '../validators/uniqueness';
import { schema } from '../models/user';
const { get } = Ember;
const { keys } = Object;
export default Ember.Controller.extend({
View gist:2babe6cf3ab8175661ad3374cbc62fb8
body {
background-color: #000;
h1 {
text-align: center;
color: #fff;
left: 0;
line-height: 200px;
View gist:b48deb6cc76c053164fba6ac6dce31f1
From 0b2c3c5507bd7b068cf827cee23bfe14fc4d616f Mon Sep 17 00:00:00 2001
Message-Id: <>
From: Josh Taylor <>
Date: Thu, 21 Apr 2016 15:49:15 +1000
Subject: [PATCH] Add ability to merge remote composer configurations via http
--- | 5 +-
src/Merge/ExtraPackage.php | 134 +++++++++++++--------
src/MergePlugin.php | 56 +++++++--

Keybase proof

I hereby claim:

  • I am joshuataylor on github.
  • I am joshtaylor ( on keybase.
  • I have a public key ASATsm875vJ9BFeZk_xNAvxkovouvULF-TkIgOUnjsGxFQo

To claim this, I am signing this object: