Skip to content

Instantly share code, notes, and snippets.

View sixtusagbo's full-sized avatar

Sixtus Miracle Agbo sixtusagbo

View GitHub Profile
@jezell
jezell / action.yaml
Last active March 26, 2025 09:16
Build Flutter Engine
# .github/actions/build-engine/action.yml
name: ""
description: "Build the engine with a specific gclient setup and config name"
inputs:
gclient:
description: "gclient name"
required: false
default: ""
config_name:
description: "name of a valid et config"
# SETUP #
DOMAIN=example.com
PROJECT_REPO="[email protected]:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@lukepighetti
lukepighetti / example.dart
Last active December 7, 2023 14:09
Another logger
class MyService {
final _log = Logger('MyService');
void init() {
try {
// operation
_log("initialized");
} catch(e, stackTrace){
_log.e("init() error", e, stackTrace);
}
@KoalityJustin
KoalityJustin / main.dart
Last active October 15, 2024 17:14
All You Need
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
extension TestingHelpers on WidgetTester {
/// Helper method for tapping a finder, and for optionally choosing the index
/// if the finder finds multiple and if we should scroll to before tapping.
Future<void> tapFinder(
Finder finder, {
extension on WidgetTester {
Future<void> launchApp() async {
await app.main();
await pumpAndSettle();
}
Future<void> clearState() async {
await SharedPreferences.getInstance().then((it) => it.clear());
}
@sixtusagbo
sixtusagbo / The Four P's.md
Last active May 30, 2022 12:04
problem solving

The Four P's of Problem Solving

Prepare

  • Diagnose the problem
  • Look for solution
  • Look for tools

Plan

  • Note your solutions by using pseudo code
@rachids
rachids / settings.json
Last active August 13, 2024 16:16
Integrate Laragon's terminal (CMDer) to Visual Studio Code
{
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
@rydmike
rydmike / analysis_options.yaml
Last active March 20, 2025 19:21
RydMike lints v2.4.0 - Personal preferences and starting point for Dart & Flutter linter rules setup.
# RydMike LINTER Preferences v2.4.0
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all lint rules, later below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart.dev/tools/linter-rules/all
#
# This version is updated for Flutter 3.29 and Dart 3.7.
#
@rodydavis
rodydavis / release.sh
Last active February 26, 2024 10:16
Flutter Release Script with Fastlane
#!/bin/bash
echo "App Release Automator by @rodydavis"
action="$1"
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
if [ ${action} = "build" ]; then
@faisalraja
faisalraja / preferences.dart
Created January 17, 2019 03:03
SharedPreference helper for flutter
class Preference {
static SharedPreferences _prefs;
static Map<String, dynamic> _memoryPrefs = Map<String, dynamic>();
static Future<SharedPreferences> load() async {
if (_prefs == null) {
_prefs = await SharedPreferences.getInstance();
}
return _prefs;
}