Skip to content

Instantly share code, notes, and snippets.

TomByrne / JsonViewer.vue
Last active Jan 21, 2021
A JSON Viewer component for Vue 3.x (using Typescript class-style components)
View JsonViewer.vue
'type-' + type,
reallyOpen ? 'open' : 'closed',
simple ? 'simple' : null
<span class="name" v-if="hasName && !isNameIndex">"{{ name }}"</span>
TomByrne / Haxe Wix Ubuntu Dockerfile
Last active Feb 6, 2019
Haxe / Wix / Ubuntu Dockerfile
View Haxe Wix Ubuntu Dockerfile
FROM syedhassaanahmed/wix-node
USER root
RUN mkdir /home/wix/src
WORKDIR /home/wix/src
# Haxe environment variables
ENV HAXEPATH /root/haxe
TomByrne / Haxe NPM
Last active Feb 1, 2021
Packaging NPM dependencies into a JS/Haxe Application
View Haxe NPM

When using NPM Dependencies in Haxe, the referenced JS doesn't get automatically pulled into your Haxe-compiled JS file. One way to include this JS is using webpack. These dependencies will only be resolved by webpack if you use the @:jsRequire metadata.

Firstly install webpack: npm i -g webpack.

After Haxe generates it's JS output, it will contain un-resolved require() calls. To resolve these dependencies (and any deeper dependencies), run webpack like this: webpack --config webpack.config.js

TomByrne / ChromaKeyFilter.hx
Last active Apr 27, 2018
Chroma Key Filter for the Haxe version of Starling 2
View ChromaKeyFilter.hx
// =================================================================================================
// Starling Framework
// Copyright Gamua GmbH. All Rights Reserved.
// This program is free software. You can redistribute and/or modify it
// in accordance with the terms of the accompanying license agreement.
// =================================================================================================
TomByrne / MultiExporter.jsx
Last active Nov 23, 2021
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See
View MultiExporter.jsx
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
// Copyright 2013 Tom Byrne
// Comments or suggestions to