Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Working From Home

Rody Davis rodydavis

:octocat:
Working From Home
View GitHub Profile
@rodydavis
rodydavis / flutter_github_ci.yml
Last active Feb 25, 2021
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
View flutter_github_ci.yml
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@rodydavis
rodydavis / flutter_navigation_rail.dart
Last active Feb 22, 2021
Flutter Navigation Rail
View flutter_navigation_rail.dart
import 'package:flutter/material.dart';
const _tabletBreakpoint = 720.0;
const _desktopBreakpoint = 1440.0;
const _minHeight = 400.0;
const _tabletSpacingVertical = 15.0;
const _tabletSpacingHorizontal = 10.0;
const _drawerWidth = 304.0;
class NavRail extends StatelessWidget {
@rodydavis
rodydavis / flutter_web_firebase_messaging.dart
Created May 1, 2020
Firebase Messaging on Flutter Web
View flutter_web_firebase_messaging.dart
import 'dart:async';
import 'package:firebase/firebase.dart' as firebase;
class FBMessaging {
FBMessaging._();
static FBMessaging _instance = FBMessaging._();
static FBMessaging get instance => _instance;
firebase.Messaging _mc;
String _token;
@rodydavis
rodydavis / release.sh
Last active Feb 6, 2021
Flutter Release Script with Fastlane
View release.sh
#!/bin/bash
echo "App Release Automator by @rodydavis"
action="$1"
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
if [ ${action} = "build" ]; then
View csv-to-material-table.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Responses</title>
</head>
<body>
<input type="file" id="file-upload" />
<script type="module">
@rodydavis
rodydavis / lit-2d-canvas.ts
Created Jan 3, 2021
Lit-Element 2d Canvas
View lit-2d-canvas.ts
import { html, LitElement, property, query } from 'lit-element';
export abstract class Lit2DCanvas extends LitElement {
@query('#base') canvas!: HTMLCanvasElement;
@property({ type: Number }) width: number | undefined;
@property({ type: Number }) height: number | undefined;
canvasWidth = 400;
canvasHeight = 400;
render() {
@rodydavis
rodydavis / dart_enum_description.dart
Created Sep 6, 2020
Add Descriptions to Enums in Dart
View dart_enum_description.dart
enum MyEnum {
simple,
special,
complex,
}
extension MyEnumUtils on MyEnum {
String get description {
switch (this) {
case MyEnum.simple:
@rodydavis
rodydavis / example.md
Created Dec 21, 2020
Based on md2googleslides this will create a Amp Story from Markdown
View example.md

{.background}

Rody Davis

Welcome to my site

This is built with Lit-Element, Parcel and Web Components!

@rodydavis
rodydavis / podcast_rss_feed.xml
Created Apr 27, 2020
Podcast RSS Feed Example
View podcast_rss_feed.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rss xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<title>Creative Engineering</title>
<googleplay:author>Rody Davis, Norbert Kozsir</googleplay:author>
<rawvoice:rating>TV-G</rawvoice:rating>
<rawvoice:location>San Francisco, California</rawvoice:location>
<rawvoice:frequency>Weekly</rawvoice:frequency>
<author>Rody Davis, Norbert Kozsir</author>
<itunes:author>Rody Davis, Norbert Kozsir</itunes:author>
@rodydavis
rodydavis / Fastfile
Last active Dec 1, 2020
Top-level Fastfile for Flutter
View Fastfile
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins