Skip to content

Instantly share code, notes, and snippets.

View sethladd's full-sized avatar

Seth Ladd sethladd

View GitHub Profile
@sethladd
sethladd / export_mtgen.js
Created April 17, 2022 16:24
Export MTG proxies from mtgen.net
console.log([...document.querySelectorAll('.active .card')].map(card => card.title.replace(" - Foil", "")).map(title => `1 ${title} (NEO)`).join("\n"))
@sethladd
sethladd / flutter_localized_title.dart
Last active July 29, 2021 08:05
Flutter example of a localized title
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Note: I'm not the original author, I'm sharing via Gist to make
// it easy for folks to check it out. Please email
// [email protected] if you have questions about that.
// A simple "rough and ready" example of localizing a Flutter app.
// Spanish and English (locale language codes 'en' and 'es') are
return new SingleChildScrollView(
child: new Container(
margin: const EdgeInsets.all(16.0),
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Expanded(child: new LayoutBuilder(builder: (BuildContext context, BoxConstraints constraints){
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="widgets library API docs, for the Dart programming language.">
<title>widgets library - Dart API</title>
<!-- required because all the links are pseudo-absolute -->
<!doctype html>
<html>
<head>
<style>
html,
body {
margin: 0;
padding: 0;
height: 100%;
@sethladd
sethladd / Original.dart
Last active June 3, 2017 18:19 — forked from asarazan/Original.dart
Comparing Flutter to what it might look like in Kotlin, Dart.soon, and Dart.wishlist
class TutorialHome extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Scafold is a layout for the major material design widgets.
return new Scaffold(
appBar: new AppBar(
leading: new IconButton(
icon: new Icon(Icons.menu),
tooltip: 'Navigation menu',
onPressed: null,
@sethladd
sethladd / index.html
Last active May 22, 2017 04:02
layout with flexbox
<!DOCTYPE html>
<html lang="en">
<head>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<header>Top Nav</header>
<div class="layout-body">
import 'package:flutter/material.dart';
import 'eventdetails/eventdetails.dart';
class SquanchyFlutterApp extends StatelessWidget {
@override
build(context: BuildContext): Widget {
final theme = ThemeData(
primarySwatch: MaterialColor(0XFFE65B77, {
var stack = Stack (
key: 1
Image.asset ( // background photo
"assets/texture.jpg"
fit: ImageFit.cover
height: 600.0
)
Positioned ( // headline
analyzer:
strong-mode: true
linter:
rules:
- always_declare_return_types
- always_specify_types
- annotate_overrides
- avoid_as
- avoid_empty_else
- avoid_init_to_null