Skip to content

Instantly share code, notes, and snippets.

[package]
name = "shopify-template2"
version = "0.1.0"
edition = "2018"
[dependencies]
rocket = "0.5.0-rc.1"
@tobymurray
tobymurray / mbedtls-failure.txt
Created July 29, 2020 15:53
idf.py build failure on Ubuntu 18.04
Checking Python dependencies...
Python requirements from /home/toby/esp/esp-idf/requirements.txt are satisfied.
Executing action: all (aliases: build)
Running cmake in directory /home/toby/esp/esp-idf/examples/wifi/smart_config/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 --warn-uninitialized -DWARN_UNINITIALIZED=1 -DCCACHE_ENABLE=0 /home/toby/esp/esp-idf/examples/wifi/smart_config"...
Warn about uninitialized values.
-- Found Git: /usr/bin/git (found version "2.17.1")
-- IDF_TARGET not set, using default target: esp32
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
@tobymurray
tobymurray / stacktrace.txt
Created December 2, 2019 20:15
Stacktrace
[java] [main] WARN o.o.c.ignore.CodegenIgnoreProcessor - Output directory does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.
[java] [main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: java (client)
[java] [main] INFO o.o.codegen.DefaultGenerator - Generator 'java' is considered stable.
[java] [main] INFO o.o.c.languages.AbstractJavaCodegen - Environment variable JAVA_POST_PROCESS_FILE not defined so the Java code may not be properly formatted. To define it, try 'export JAVA_POST_PROCESS_FILE="/usr/local/bin/clang-format -i"' (Linux/Mac)
[java] [main] INFO o.o.c.languages.AbstractJavaCodegen - NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).
[java] [main] INFO o.o.c.languages.AbstractJavaCodegen - Invoker Package Name, originally not set, is now derived from api package name: com.bugreproduction.swagger.client
[java] [main] INFO o.o.c.languages.Abs
@tobymurray
tobymurray / api.yaml
Last active December 2, 2019 20:21
OpenAPI generator regression
swagger: "2.0"
info:
version: "3"
title: API
host: localhost:8443
basePath: /api
schemes:
- https
@tobymurray
tobymurray / autorest-client-runtime-for-java 1.5.4 pom
Created July 6, 2018 02:58
Mysterious pom.xml for com.microsoft.azure:autorest-clientruntime-for-java:1.5.4<
<!--
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for
license information.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>autorest-clientruntime-for-java</artifactId>
@tobymurray
tobymurray / sendEmail.js
Last active February 29, 2020 09:23
Send email with Gmail and NodeJS
const fs = require('fs');
const readline = require('readline');
const google = require('googleapis');
const googleAuth = require('google-auth-library');
const Base64 = require('js-base64').Base64;
const SCOPES = ['https://mail.google.com/',
'https://www.googleapis.com/auth/gmail.modify',
'https://www.googleapis.com/auth/gmail.compose',
'https://www.googleapis.com/auth/gmail.send'
@tobymurray
tobymurray / example.ca
Last active July 4, 2017 04:47
nginx configuration with proxy to server
server {
listen 80;
listen [::]:80;
server_name example.ca www.example.ca;
location / {
root /home/toby/client;
index index.html
try_files $uri $uri/ /index.html;
}
@tobymurray
tobymurray / index.js
Created June 11, 2017 18:24
Express server with PostGraphQL middleware
require('dotenv').config();
const express = require('express');
const postgraphql = require('postgraphql').postgraphql;
const app = express()
const postgresConfig = {
user: process.env.POSTGRES_USERNAME,
password: process.env.POSTGRES_PASSWORD,
host: process.env.POSTGRES_HOST,
@tobymurray
tobymurray / index.js
Last active September 27, 2021 16:41
Delete non-empty directory over FTP with JavaScript
const JSFtp = require("jsftp");
const path = require('path');
var ftp = new JSFtp({
host: process.env.HOST,
port: process.env.PORT,
user: process.env.USERNAME,
pass: process.env.PASSWORD
});
var drawingManager;
var selectedShape;
var colors = ['#1E90FF', '#FF1493', '#32CD32', '#FF8C00', '#4B0082'];
var selectedColor;
var colorButtons = {};
function clearSelection() {
if (selectedShape) {
selectedShape.setEditable(false);
selectedShape = null;