Skip to content

Instantly share code, notes, and snippets.

View michaelmang's full-sized avatar

Michael Mangialardi michaelmang

View GitHub Profile
michaelmang / index.js
Created January 6, 2022 18:34
Contract Dictionary (Like Style Dictionary for Schemas)
View index.js
import glob from 'glob';
import fs from 'fs';
import { compile as compileTypeScript } from 'json-schema-to-typescript';
import path from 'path';
import rimraf from 'rimraf';
const FORMATS = Object.freeze({
json: 'json',
typescript: 'typescript',
michaelmang /
Created December 3, 2021 18:07
Side by Side Images - GitHub Markdown
michaelmang / index.js
Created November 2, 2021 15:11
react-tokengen idea - rough start
View index.js
const { exec } = require('child_process');
const fs = require('fs');
const path = require('path');
const ping = require('ping');
const puppeteer = require('puppeteer');
const reactDocs = require('react-docgen');
const componentSrc = `
import React, { Component } from 'react';
import PropTypes from 'prop-types';
View eslint-plugin-tokens.js
/* Should be adjusted based on different tokenization */
import { colord } from 'colord';
import { from } from 'nearest-color';
import tokens from 'your-tokens';
function getType(key) {
if (key.toLowerCase().includes('color')) {
return 'color';
michaelmang / scrape_sermons.js
Created December 9, 2020 21:28
Scrape Grace Gems Script
View scrape_sermons.js
import chalk from 'chalk';
import clear from 'clear';
import CLI from 'clui';
import figlet from 'figlet';
import fs from 'fs';
import jsonFormat from 'json-format';
import kebabCase from 'lodash.kebabcase';
import startcase from 'lodash.startcase';
import tolower from 'lodash.tolower';
import truncate from 'lodash.truncate';
michaelmang / unused_imports.js
Created August 16, 2019 17:03
Remove Unused Imports
View unused_imports.js
export default function transformer(file, api, options) {
const j = api.jscodeshift;
const root = j(file.source);
const removeIfUnused = (importSpecifier, importDeclaration) => {
const varName =;
if (varName === "React") {
return false;
michaelmang / Counter.scala
Last active April 29, 2017 09:11
Counter App Scala.js with Vue
View Counter.scala
package scalajs.vue.Counter
import org.scalajs.dom
import org.scalajs.dom._
import scala.scalajs.js
import scala.scalajs.js.Any._
import scala.scalajs.js.Dynamic.{literal, global => g}
import scala.scalajs.js.{Dynamic, JSApp}
import scala.scalajs.js.annotation.JSExport
import scalajs.vuejs.Vue
michaelmang / index.html
Created October 5, 2016 16:27
interactive resume
View index.html
<a href="" id="logo">
<h1 class="animated slideInLeft">michael mangialardi</h1>
<ul class="animated slideInRight">
<li><a href="" download>resume</a></li>
<li><a href="">hire</a></li>