Skip to content

Instantly share code, notes, and snippets.

View AlexMeuer's full-sized avatar
🇵🇸

Alex Meuer AlexMeuer

🇵🇸
View GitHub Profile
@AlexMeuer
AlexMeuer / GCP & Firebase Stylish Themes
Last active March 6, 2020 10:21
Solarized Stylish themes for GCP and Firebase
We couldn’t find that file to show.
@AlexMeuer
AlexMeuer / logging_module.dart
Created July 26, 2020 10:35
copy-pastable injectable logger config
import 'package:injectable/injectable.dart';
import 'package:logger/logger.dart';
@module
abstract class LoggingModule {
@lazySingleton
Logger get logger;
@dev
@injectable
@AlexMeuer
AlexMeuer / dart.json
Last active September 29, 2023 07:49
VSCode User Snippets and Settings
{
"Part statement": {
"prefix": "pts",
"body": [
"part '${TM_FILENAME_BASE}.g.dart';",
],
"description": "Creates a filled-in part statement"
},
"Part 'Freezed' statement": {
"prefix": "ptf",
@AlexMeuer
AlexMeuer / extract_component
Last active November 16, 2023 12:36
Extract prop types and component name
#!/bin/bash
# Assumes that the component file has the prop types above the functional component.
# The prop types may or may not have a JSDoc comment block above them.
# Assumes that the functional component is exported.
if [ $# -eq 0 ]; then
printf "Attempts to extract prop types and component name from a component file.\n"
printf "\e[92mUsage: \e[0m \e[93m%s <file_path>\e[0m\n" "$(basename "${0}")"
printf "\e[92mExample:\e[0m \e[93m%s src/components/MyComponent.tsx | tee /dev/tty | pbcopy\e[0m\n" "$(basename "${0}")"
@AlexMeuer
AlexMeuer / open_current_meeting.fish
Last active February 29, 2024 14:50
Open current meeting in zoom (from google calendar via gcalcli)
gcalcli agenda (date) (date -v 23H -v 59M -v 59S) --details=location --tsv \
| awk -v current_time=(date +%H:%M) -F '\t' '{if ($2 <= current_time && $4 > current_time && $6 != "") print $6}' \
| head -n 1 \
| xargs -I {} sh -c "open -a zoom.us {}"
# Escaped fish abbreviation that can be added to `~/config/fish/config.fish`
abbr -a -- zoomq gcalcli\ agenda\ \(date\)\ \(date\ \ -v\ 23H\ -v\ 59M\ -v\ 59S\)\ --details=location\ --tsv\ \|\ awk\ -v\ current_time=\(date +%H:%M\)\ -F\ \'\\t\'\ \'\{if\ \(\$2\ \<=\ current_time\ \&\&\ \$4\ \>\ current_time\ \&\&\ \$6\ !=\ \"\"\)\ print\ \$6\}\'\ \|\ head\ -n\ 1\ \|\ xargs\ -I\ \{\}\ sh\ -c\ \"open\ -a\ zoom.us\ \{\}\"