Skip to content

Instantly share code, notes, and snippets.

View bryantwilliam's full-sized avatar

W bryantwilliam

  • 10:05 (UTC +08:00)
View GitHub Profile

Daily Nootropic & Nutrition Cheatsheet

Emoji Legend

💪 – Cellular Energy & Physical Performance
(Ingredients that support workouts and pump, enhance nutrient delivery, support mitochondrial function, or improve circulation.)

🔥 – Mental Activation & Drive
(Compounds that raise energy, motivation, and general “get‑up”.)

🎯 – Focus & Concentration

@bryantwilliam
bryantwilliam / selection_transformer.dart
Last active February 1, 2025 04:44 — forked from Schwusch/selection_transformer.dart
A widget that transforms the text selection when copied.
import 'package:collection/collection.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
typedef SelectionTransform = String Function(Iterable<String>);
/// Original version: https://github.com/flutter/flutter/issues/104548#issuecomment-1683714851
/// Next version: https://gist.github.com/Schwusch/edf778492423db42a0ad11efd5bc8727
/// This version: https://gist.github.com/bryantwilliam/62a2b4cbd390a0e62612b3ea85c7f5e9
/// A widget that transforms the text selection when copied.
@bryantwilliam
bryantwilliam / main.dart
Last active May 16, 2024 12:23
highlight selected html in flutter
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:html/dom.dart' as dom;
Future<void> main() async {
runApp(const ProviderScope(child: MyApp()));
}
class MyApp extends ConsumerStatefulWidget {
@bryantwilliam
bryantwilliam / Goal Pursuit: 7 Tools to Make It Easier and More Effective - From Andrew Huberman.md
Last active May 9, 2024 22:37
From Andrew Huberman, associate professor of neurobiology and ophthalmology at the Stanford University School of Medicine.

Goal Pursuit: 7 Tools to Make It Easier and More Effective - From Andrew Huberman, associate professor of neurobiology and ophthalmology at the Stanford University School of Medicine

Once you have specified your goal and outlined the necessary action steps, use tools 1-7. They will help you to stay motivated and reach your goal.

Tool 1: The Post-it Note Fallacy

Placing a note on the mirror that exclaims “floss!” or “run today!” might be motivating at first, but likely, after a few days, you fail to “see” this visual reminder anymore. The brain monitors for anything new in our environment. But it doesn’t call our attention to the day-to-day similarities. A static visual reminder will fail to trigger action. Instead, write a new note every few days and post it in a different location.

Tool 2: Visualize the End and Visualize What Failure Looks Like

@bryantwilliam
bryantwilliam / gist:1ce4240cabdafcc5938c
Last active October 2, 2015 07:56
Garry's Mod fix.
sudo su
find ./ -depth -type d -exec rename 'y/[A-Z]/[a-z]/' {} ";"
find ./ -depth -type d -exec rename 'y/[A-Z]/[a-z]/' {} ";"