Skip to content

Instantly share code, notes, and snippets.

View devmsh's full-sized avatar
👨‍💻
Available for new projects

Mohammed S Shurrab devmsh

👨‍💻
Available for new projects
View GitHub Profile
@devmsh
devmsh / bitbucket-pipelines.yml
Created March 18, 2020 20:52
The simplest bitbucket flutter testing pipelines
image: cirrusci/flutter:latest
pipelines:
default:
- step:
script:
- flutter test test
@devmsh
devmsh / macro.php
Created March 27, 2020 10:00
Laravel assertPaginated macro
<?php
// Usgae
// test that posts api return a 15 post/page paginated response.
$this->get('api/posts')->assertPaginated(15);
/**
* If you use Laravel API resources and want test if an endpoint
* is paginated use can use: $this->get('...')->assertPaginated();
*
test(
'should get invaled data from login use case on error data',
() async {
mockPost(
url: Constant.api + "login",
response: fixture('login', "failed.json"),
status: 422,
);
var authBloc = sl<AuthBloc>();
import 'dart:convert';
import 'package:equatable/equatable.dart';
import 'package:iStoria/core/models/links.dart';
import 'package:iStoria/core/models/meta.dart';
import 'package:iStoria/core/models/response_converter.dart';
import 'package:json_annotation/json_annotation.dart';
part 'list_response.g.dart';
@devmsh
devmsh / distribute-android-staging.sh
Last active May 3, 2025 19:11
Build and distribute flutter app to Firebase App Distribution
echo "Building flutter Android release"
flutter build apk --release -t lib/main_staging.dart --flavor staging
echo "Distribut Android release"
firebase appdistribution:distribute \
./build/app/outputs/flutter-apk/app-staging-release.apk \
--app 1:612834649949:android:b8f54d1cdb7c3f611caab4 \
--release-notes-file ./release_notes.txt \
--groups="internal-testers"
@devmsh
devmsh / gist:2cdd2a9f8eba19271821f7bc55bbd5a1
Last active February 10, 2026 08:40
Easily change laravel routes from strings to static class references
# Easily change laravel routes from strings to static class references
1. Open your route file in your prefered IDE
2. Find and replace using regex
3. Find \'([A-Za-z]*)\@([A-Za-z]*)\'
4. Replace with [App\\Http\\Controllers\\$1::class,'$2']
5. Find \'([A-Za-z]*Controller)\'
6. Replace with App\\Http\\Controllers\\$1::class
5. Done!