Skip to content

Instantly share code, notes, and snippets.

@davidag
davidag / issue.md
Created November 15, 2019 18:21
Error running "poetry install" as per Contributing documentation

With a clean pelican repo run the following commands, as per the contributing documentation:

$ mkdir ~/virtualenvs
$ python3 -m venv ~/virtualenvs/pelican
$ source ~/virtualenvs/pelican/bin/activate

(pelican) $ pip install -e ~/projects/pelican invoke
(pelican) $ invoke setup
...
import argparse
import json
# This script extracts just notes as html. No notebooks, topics or tags.
parser = argparse.ArgumentParser(description="Extract html notes from a notesnook backup")
parser.add_argument("backupfile", action="store")
args = parser.parse_args()
with open(args.backupfile, mode="rt") as f:
@davidag
davidag / main.dart
Last active July 27, 2023 12:00
Problem: How to use GoRouter and Flutter Adaptive Scaffold
import 'package:flutter/material.dart';
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
import 'package:go_router/go_router.dart';
final router =
GoRouter(initialLocation: '/', debugLogDiagnostics: true, routes: [
GoRoute(
path: '/',
builder: (context, state) => const AppScreen(primaryBody: Placeholder()),
),
@davidag
davidag / main.dart
Created July 27, 2023 11:56
Problem: How to use GoRouter and Flutter Adaptive Scaffold
import 'package:flutter/material.dart';
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
import 'package:go_router/go_router.dart';
final router =
GoRouter(initialLocation: '/', debugLogDiagnostics: true, routes: [
GoRoute(
path: '/',
builder: (context, state) => const AppScreen(primaryBody: Placeholder()),
),