Skip to content

Instantly share code, notes, and snippets.

View BrianCraig's full-sized avatar

Brian BrianCraig

View GitHub Profile
@BrianCraig
BrianCraig / main.dart
Created November 7, 2022 05:07
solar-kingdom-8851
abstract class IIsEmpty{
bool get isEmpty;
}
bool isEmptyList<T extends List>(T x) => x.isEmpty;
bool isEmptyMap<T extends Map>(T x) => x.isEmpty;
bool isEmpty<T extends IIsEmpty>(T x) => x.isEmpty;
@BrianCraig
BrianCraig / main.dart
Created October 7, 2022 06:31
yawning-ritual-4397
import 'package:flutter/widgets.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@BrianCraig
BrianCraig / main.dart
Created August 5, 2022 01:07 — forked from chaudharydeepanshu/main.dart
data_grid_jank_example
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@BrianCraig
BrianCraig / rust-xtensa.md
Last active April 27, 2021 12:54
Using rust-xtensa without Xargo and Xbuild, working with VsCode

Using rust-xtensa without Xargo and Xbuild

This document explains how to use the rust xtensa tools on Linux, building and flashing without xbuild or xargo, so its easier to run rls (Rust Language Syntax) for better integration on VsCode Rust extension (and probably other IDEs too).
Please if you use Windows and you can make it work, you can contribute forking this gist.

Caveat

I couldn't use RustUp because i ran into different problems while linking the toolchain and usign the vscode extension. Probably could be integrated someway.

Configuring and Compiling Rust

@BrianCraig
BrianCraig / instancing.js
Last active June 17, 2016 04:16
THREE instancing idea
var geometry = new THREE.InstancedBufferGeometry();
var material = new THREE.RawShaderMaterial() ;
// For using instances you have to create an InstancedMesh
var instancer = new THREE.InstancedMesh( geometry, material ,{
attributes:{
color: {
type: Float32Array,
size:4,
@BrianCraig
BrianCraig / main.go
Created November 11, 2015 18:00
Simple App for GoMobile, that logs lifecycle and paints events for debugging purposes
// +build darwin linux
package main
import "fmt"
import "golang.org/x/mobile/app"
import "golang.org/x/mobile/event/lifecycle"
import "golang.org/x/mobile/event/paint"