I hereby claim:
- I am ben-xd on github.
- I am tlduck (https://keybase.io/tlduck) on keybase.
- I have a public key ASDvN4KZvBvOhkqJFKZDTH8PscCY709vr6k0pgEx2fG2vAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.
To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:
tell application "System Preferences"
set CurrentPane to the id of the current pane
set the clipboard to CurrentPane| // Inspired by https://www.reddit.com/r/ChatGPT/comments/zm237o/save_your_chatgpt_conversation_as_a_markdown_file/ + my own customisations | |
| function h(html) { | |
| return html.replace(/<p>/g, '\n\n').replace(/<\/p>/g, '').replace(/<b>/g, '**').replace(/<\/b>/g, '**').replace(/<i>/g, '_').replace(/<\/i>/g, '_').replace(/<code[^>]*>/g, (match) => { const lm = match.match(/class="[^"]*language-([^"]*)"/); return lm ? '\n```' + lm[1] + '\n' : '```'; }).replace(/<\/code[^>]*>/g, '```').replace(/<[^>]*>/g, '').replace(/Copy code/g, '').replace(/This content may violate our content policy. If you believe this to be in error, please submit your feedback — your input will aid our research in this area./g, '').trim(); | |
| } | |
| (() => { | |
| const title = document.querySelector("a.dark\\:bg-gray-800 div")?.textContent || "Chat"; | |
| const filename = `${title}.md`; | |
| let t = `# ${title}\n`; |
| ... | |
| # Aliases adapted from https://snyk.io/blog/10-git-aliases-for-faster-and-productive-git-workflow/ and http://blog.kfish.org/2010/04/git-lola.html | |
| [alias] | |
| # Logging | |
| s = status | |
| l = log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30 | |
| lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
| lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
| new = log origin/main@{1}..origin/main@{0} |
| import 'dart:async'; | |
| String callbackOne() => "hello"; | |
| Future<String> callbackTwo() async => (await Future.delayed(Duration(seconds: 1),() => "This is a sentence")); | |
| Future<int> getLengthOfResult(FutureOr<String> Function() callback) async { | |
| // I can await on callbackOne, even though it returns a String. | |
| final result = await callback(); | |
| return result.length; |
| import 'dart:async'; | |
| import 'package:http/http.dart' as Http; | |
| String callbackOne() => "hello"; | |
| Future<String> callbackTwo() async => (await Future.delayed(Duration(seconds: 1),() => "This is a sentence")); | |
| Future<int> getLengthOfResult2(String Function() callback) async { | |
| return callback().length; |
| // Doesn't actually use the PageView, because it doesn't current work. | |
| import 'package:flutter/material.dart'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } |
| import "dart:math"; | |
| import "package:vector_math/vector_math.dart"; | |
| class Orientation { | |
| // radians | |
| final double yaw; | |
| final double pitch; | |
| final double roll; | |
| Orientation({required this.yaw, required this.pitch, required this.roll}); | |
| } |
| import 'package:flutter_test/flutter_test.dart'; | |
| import 'package:flutter/material.dart'; | |
| const buttonKey = Key("button"); | |
| const alertDialogKey = Key("alertDialog"); | |
| class MyApp extends StatelessWidget { | |
| showAppDialog(BuildContext context) async { | |
| print("Showing app dialog"); | |
| await showDialog( |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| showAppDialog(BuildContext context) { | |
| print("Showing app dialog"); | |
| showDialog(context: context, | |
| builder: (context) { | |
| return AlertDialog( |