This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Command; | |
use App\Entity\User; | |
use Doctrine\ORM\EntityManagerInterface; | |
use Symfony\Component\Console\Attribute\AsCommand; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApiClient { | |
ApiClient({ | |
required String baseURL, | |
required http.Client client, | |
List<HttpInterceptor>? interceptors, | |
}) : _client = HttpClient(baseURL: baseURL, interceptors: interceptors, client: client); | |
/// HTTP client to send requests | |
final HttpClient _client; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ignore_for_file: cascade_invocations | |
import 'dart:math' as math; | |
import 'package:flutter/widgets.dart'; | |
enum BarChartAlignment { start, center } | |
/// Constructs a bar chart widget. | |
class BarChartWidget extends LeafRenderObjectWidget { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{$SERVER_NAME} { | |
root * /srv/app/public | |
file_server | |
try_files {path} /index.html | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
ARG PB_VERSION=0.22.21 | |
RUN apk add --no-cache \ | |
unzip \ | |
ca-certificates | |
# download and unzip PocketBase | |
ADD https://github.com/pocketbase/pocketbase/releases/download/v${PB_VERSION}/pocketbase_${PB_VERSION}_linux_amd64.zip /tmp/pb.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ignore_for_file: public_member_api_docs, sort_constructors_first | |
import 'dart:async'; | |
import 'dart:ui' as ui; | |
import 'package:firebase_storage/firebase_storage.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/widgets.dart'; | |
/// An [ImageProvider] that retrieves an image from Firebase Storage. | |
@immutable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
typedef Stringify<T> = String Function(T item); | |
/// Utility class to apply Levenshtein score on each items | |
class SearchResult<T> implements Comparable<SearchResult<T>> { | |
SearchResult(this.value, {required this.score}); | |
final double score; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:freezed_annotation/freezed_annotation.dart'; | |
part 'form.freezed.dart'; | |
@freezed | |
class FormStatus with _$FormStatus { | |
// Class representing the status of a form at any given point in time. | |
const FormStatus._(); | |
/// The form has not yet been submitted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetBucketLocation", | |
"s3:ListBucket", | |
"s3:ListBucketMultipartUploads" | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Map<String, String> languageFlagMap = { | |
'aa': '🇪🇹', // Afar - Ethiopia | |
'ab': '🇬🇪', // Abkhaz - Georgia | |
'af': '🇿🇦', // Afrikaans - South Africa | |
'am': '🇪🇹', // Amharic - Ethiopia | |
'ar': '🇪🇬', // Arabic - Egypt | |
'as': '🇮🇳', // Assamese - India | |
'ay': '🇧🇴', // Aymara - Bolivia | |
'az': '🇦🇿', // Azerbaijani - Azerbaijan | |
'be': '🇧🇾', // Belarusian - Belarus |
NewerOlder