Skip to content

Instantly share code, notes, and snippets.

View Cargo.toml
[package]
name = "shopify-template2"
version = "0.1.0"
edition = "2018"
[dependencies]
rocket = "0.5.0-rc.1"
@tobymurray
tobymurray / mbedtls-failure.txt
Created Jul 29, 2020
idf.py build failure on Ubuntu 18.04
View mbedtls-failure.txt
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
View stacktrace.txt
[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 Dec 2, 2019
OpenAPI generator regression
View api.yaml
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 Jul 6, 2018
Mysterious pom.xml for com.microsoft.azure:autorest-clientruntime-for-java:1.5.4<
View autorest-client-runtime-for-java 1.5.4 pom
<!--
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 Feb 29, 2020
Send email with Gmail and NodeJS
View sendEmail.js
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 Jul 4, 2017
nginx configuration with proxy to server
View example.ca
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 Jun 11, 2017
Express server with PostGraphQL middleware
View index.js
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 Sep 27, 2021
Delete non-empty directory over FTP with JavaScript
View index.js
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
});
View gist:f80f81dfb0d73d6443a9
var drawingManager;
var selectedShape;
var colors = ['#1E90FF', '#FF1493', '#32CD32', '#FF8C00', '#4B0082'];
var selectedColor;
var colorButtons = {};
function clearSelection() {
if (selectedShape) {
selectedShape.setEditable(false);
selectedShape = null;