Skip to content

Instantly share code, notes, and snippets.

View joshtynjala's full-sized avatar

Josh Tynjala joshtynjala

View GitHub Profile
@joshtynjala
joshtynjala / normalize-help-adobe-com-html.js
Last active April 12, 2024 20:46
Normalizes the HTML in old documentation from help.adobe.com that is Creative Commons licensed (to make it easier to clean up and convert into other formats, like Markdown, with tools like pandoc)
document.body.querySelector("#ahpod")?.remove();
document.body.querySelector("#mboxScriptContainer")?.remove();
let h1 = document.querySelector("#content_wrapper h1:first-of-type");
let article = document.querySelector(
"table#inner_content_table td:first-of-type"
);
article.querySelector("div:first-of-type")?.remove();
article.querySelector("#chcPromo")?.remove();
article.querySelectorAll("script")?.forEach((element) => element.remove());
article.querySelector("#userprefs")?.remove();
@joshtynjala
joshtynjala / tasks.json
Created February 2, 2024 17:53
Use dependsOn in tasks.json to build a library project SWC before an app project SWF in vscode-as3mxml
{
"version": "2.0.0",
"tasks": [
{
"type": "actionscript",
"debug": true,
"asconfig": "LibraryProject/asconfig.json",
"group": "build",
"problemMatcher": [],
"label": "ActionScript: compile debug - LibraryProject/asconfig.json",
@joshtynjala
joshtynjala / FeathersUIWrapper.as
Last active February 8, 2022 18:42
FeathersUIWrapper for Apache Flex
////////////////////////////////////////////////////////////////////////////////
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@joshtynjala
joshtynjala / asconfig.json
Created February 5, 2021 19:12
asconfig.json: How to create an ActionScript/MXML project with workers in Visual Studio Code
{
"config": "flex",
"compilerOptions": {
"source-path": "src",
"output": "bin/MyProject.swf"
},
"mainClass": "MyProject",
"workers": [
{
"file": "src/MyWorker.as",
@joshtynjala
joshtynjala / asconfig.json
Created October 16, 2020 19:48
asconfig.json: How to create an Apache Flex project with modules in Visual Studio Code
{
"config": "flex",
"compilerOptions": {
"source-path": "src",
"output": "bin/MyProject.swf"
},
"mainClass": "MyProject",
"modules": [
{
"file": "src/MyModule.mxml",
@joshtynjala
joshtynjala / asconfig.json
Last active September 29, 2020 15:09
asconfig.json: How to use the "extends" field to define different options for debug and release builds
{
"config": "air",
"compilerOptions": {
"source-path": "src"
},
"application": "src/MyProjectDebug-app.xml",
"mainClass": "MyProject"
}
@joshtynjala
joshtynjala / profiles.json
Created August 8, 2019 15:46
Ayu color schemes for Windows Terminal
{
"schemes" :
[
{
"background" : "#fafafa",
"black" : "#000000",
"blue" : "#3199e1",
"brightBlack" : "#686868",
"brightBlue" : "#399ee6",
"brightCyan" : "#4cbf99",
@joshtynjala
joshtynjala / tasks.json
Last active June 24, 2016 01:25
Visual Studio Code tasks.json for asjsc #NextGenAS
{
"version": "0.1.0",
"command": "asjsc",
"isShellCommand": true,
"args": ["src/Main.as"],
"showOutput": "always",
"problemMatcher":
{
"fileLocation": "absolute",
"pattern":
@joshtynjala
joshtynjala / HeaderFactory.mxml
Last active April 17, 2016 17:04
Feathers SDK leftItems in a Panel's Header
<f:Panel headerFactory="{factoryFromInstance(myHeader)}">
<fx:Declarations>
<f:Header id="myHeader">
<fx:leftItems>
<fx:Vector type="starling.display.DisplayObject">
<f:Button/>
</fx:Vector>
</fx:leftItems>
</f:Header>
</fx:Declarations>
@joshtynjala
joshtynjala / FactoryFromInstance.mxml
Created April 17, 2016 16:39
Feathers SDK factoryFromInstance()
<f:Panel headerFactory="{factoryFromInstance(myHeader)}">
<fx:Declarations>
<f:Header id="myHeader"/>
</fx:Declarations>
</f:Panel>