Skip to content

Instantly share code, notes, and snippets.

View mjgartendev's full-sized avatar

Michael Garten mjgartendev

View GitHub Profile
@mjgartendev
mjgartendev / functional.ts
Created August 25, 2020 19:34
A collection of common utilities
// pipe
// curry
@mjgartendev
mjgartendev / index.html
Created August 10, 2019 10:30 — forked from billiegoose/index.html
magic portal (isomorphic-git)
<div>
<input id="repository" type="text" style="width: 50em" title="Tip: enter a private repo URL to see the credentialManager plugin prompt for a password.">
<button type="button" id="cloneButton">Clone</button>
</div>
<output id="log" style="white-space: pre; font-family: monospace;"></output>
<script src="https://unpkg.com/magic-portal"></script>
<script>
let worker = new Worker("./worker.js")
{
"entry": [
{
"id": "140571837",
"hash": "a1fad8733a3e4f2d10976912f8d86208",
"requestHash": "mjgartendev",
"profileUrl": "http://gravatar.com/mjgartendev",
"preferredUsername": "mjgartendev",
"thumbnailUrl": "https://secure.gravatar.com/avatar/a1fad8733a3e4f2d10976912f8d86208",
"photos": [
<style id="jsbin-css">
.selected {
background: #EFE;
}
</style>
<script src="https://fb.me/react-with-addons-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<script id="jsbin-javascript">
// A simple store
var store = {count: 0};
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-with-addons-0.12.2.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://arqex.github.io/freezer/freezer.js"></script>
<style id="jsbin-css">
.docEditor > .objectAttr {
@mjgartendev
mjgartendev / colorVars.css
Created April 13, 2019 13:04 — forked from softpunch/colorVars.css
CSS Variables For Color Manipulation
/* ----
css custom properties to manipulate color
MIT - 2017 - Soft Punch
https://gist.github.com/softpunch/
set initial "main" color via HSL values.
automatically calculate harmonies and variations of that color with pure css.
harmonies are determined solely by hue.
@mjgartendev
mjgartendev / Component.ts
Last active April 6, 2019 04:28
Trello Clone stuff
interface IComponent {
type: string
name: string
props: KvPair[]
classes: string[]
slots: string[]
}
{
"$schema": "vscode://schemas/color-theme",
"type": "dark",
"colors": {
"activityBar.background": "#282c34",
"activityBar.foreground": "#d7dae0",
"activityBarBadge.background": "#4d78cc",
"activityBarBadge.foreground": "#f8fafd",
"badge.background": "#282c34",
"button.background": "#404754",
@mjgartendev
mjgartendev / css-grid-layout-designer.markdown
Created December 27, 2018 15:39
CSS Grid Layout Designer
@mjgartendev
mjgartendev / xmlToJson.js
Created November 2, 2018 00:18
Script to convert XML to JSON from https://davidwalsh.name/convert-xml-json
// Changes XML to JSON
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) { // element
// do attributes
if (xml.attributes.length > 0) {
obj["@attributes"] = {};