Skip to content

Instantly share code, notes, and snippets.

View sixtusagbo's full-sized avatar
🏡
Working from home

Sixtus Miracle Agbo sixtusagbo

🏡
Working from home
View GitHub Profile
@sixtusagbo
sixtusagbo / main.dart
Last active March 20, 2024 03:19
Rajvis Infinite size issue
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@sixtusagbo
sixtusagbo / git_commited_but_unpushed.md
Last active March 19, 2024 06:51
How to get a list of all the files that have been commited but not yet pushed
You can use the following Git command in your terminal to see a list of all files that have been committed but not yet pushed:
git diff --name-only origin/main

This command compares your local repository (including committed changes) with the main branch on the origin remote repository.

To view more statistics on it:
git diff --stat origin/main
@sixtusagbo
sixtusagbo / translators.html
Created March 18, 2024 01:22
i18n for web w/ translators
<!-- Google Translate -->
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
@sixtusagbo
sixtusagbo / release.sh
Created February 26, 2024 10:16 — forked from rodydavis/release.sh
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
@sixtusagbo
sixtusagbo / example.dart
Created December 7, 2023 14:07 — forked from lukepighetti/example.dart
Another logger
class MyService {
final _log = Logger('MyService');
void init() {
try {
// operation
_log("initialized");
} catch(e, stackTrace){
_log.e("init() error", e, stackTrace);
}
@sixtusagbo
sixtusagbo / main.dart
Created November 14, 2023 01:41
Weird and Not Weird numbers...
import 'dart:math';
void main() {
Random random = Random();
/// Generate random number between 1 to 10
int n = random.nextInt(10)+1;
bool _even = n % 2 == 0;
/// Inclusive range from 2 to 5
List<int> rangeOne = [for(var i=2; i<=5; i++) i];
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 / main.dart
Last active October 22, 2023 04:07
Flutter ModalBottomSheet
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
@sixtusagbo
sixtusagbo / SignedApkGenrator.sh
Created September 5, 2023 09:19 — forked from prajapatiravi257/SignedApkGenrator.sh
Small bash script for generating keystore file and generate signed apk for ionic apps
#!/bin/bash
echo "-----------Release apk builder for Ionic-------------"
echo "---------------By rio257-------------------"
read -p "Do you want to generate keystore file? <Y/N> " prompt
read -p "Enter the name of app? " appname
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
@sixtusagbo
sixtusagbo / variables.c
Last active July 23, 2023 21:42
signed vs unsigned in C
#include <stdio.h>
/**
* main - Entry point
*
* Return: Always (0)
*/
int main(void)
{
unsigned int num_one = 3;