Skip to content

Instantly share code, notes, and snippets.

View bryantwilliam's full-sized avatar

W bryantwilliam

  • New Zealand
  • 21:01 (UTC +12:00)
View GitHub Profile
@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 / TheDayAhead_pageTemplate.xaml
Last active March 1, 2017 05:39
Page template I made for TheDayAhead xamarin app. (Background image, navigation bottom bar, namespace declarations)
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TheDayAhead.DiaryPage"
xmlns:local="clr-namespace:TheDayAhead;assembly=TheDayAhead">
<ContentPage.Padding>
<OnPlatform x:TypeArguments="Thickness"
iOS="0, 20, 0, 0" />
</ContentPage.Padding>
@bryantwilliam
bryantwilliam / pom.xml
Last active August 29, 2015 14:19
Bukkit pom template
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.gogobebe2</groupId>
<artifactId></artifactId>
<version>1.0.0-DEVELOPMENT-SNAPSHOT</version>
@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]/' {} ";"