Skip to content

Instantly share code, notes, and snippets.

@g-a-v-i-n
g-a-v-i-n / gen.js
Last active September 26, 2019 19:47
const fs = require('fs')
const prefix = 'Button'
const targets = [
{
name: 'Wide',
style: {
width: '100%',
padding: '2rem 0rem',
/- *lyre
|%
++ screen
|= [a=dom b=dom c=dom d=dom e=dom]
^- dom
:+ %row
~[w-100 h-100 bg-gray-1]
:~ :+ %list
:~ [%axis %col]
[%basis %pix 320]
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import {Controlled as CodeMirror} from 'react-codemirror2'
import 'codemirror/lib/codemirror.css';
import 'codemirror/theme/material.css';
import 'codemirror/mode/markdown/markdown'
:root {
--dark-gray: #555555;
--gray: #7F7F7F;
--medium-gray: #CCCCCC;
--light-gray: rgba(0,0,0,0.08);
}
html, body {
padding: 0;
// Stylistically its nicer to keep type defs out of the component block.
type Props = {
selected?: boolean
}
// Not 100% sure but you might have to add styled-system props here,
// or get the property type definitions from Box and extend with `selected`
// In that case, your Props type would look like
type Props = BoxProps & {
selected?: boolean
}
import * as React from 'react'
import styled from "styled-components";
import css, { SystemStyleObject } from "@styled-system/css";
import {
border,
BorderProps,
color,
ColorProps,
flexbox,
FlexboxProps,
import * as React from "react";
import styled from "styled-components";
import css, { SystemStyleObject } from "@styled-system/css";
import {
border,
BorderProps,
color,
ColorProps,
flexbox,
FlexboxProps,
import { SystemStyleObject } from '@styled-system/css';
type SystemStyleObjects = {
[key: string]: SystemStyleObject;
};
type IndigoSystemStyleProp = string | string[] | number[] | (string & (string | number | symbol | null)[]) | (string & {
[x: string]: string | number | symbol | undefined;
[x: number]: string | number | symbol | undefined;
}) | undefined
const Foo = styled(CodeMirror)`
.keyword {
color: ${p => p.theme.colors.purple};
}
`
import sys
import logging
from logging import Formatter
import json
import http.client
import time
from apscheduler.schedulers.background import BackgroundScheduler
from flask import Flask
from flask import Response, request, send_from_directory, jsonify