Skip to content

Instantly share code, notes, and snippets.

View jscarl's full-sized avatar
🏠
Working from home

joshua carl jscarl

🏠
Working from home
  • Jakarta, Indonesia
View GitHub Profile
@jscarl
jscarl / main.dart
Created March 28, 2024 12:08
Hanlde 404 image from network debug print
void main() async {
FlutterError.onError = (FlutterErrorDetails details) {
if (details.library == 'image resource service' &&
details.exception.toString().contains('404')) {
print('Suppressed cachedNetworkImage Exception');
return;
}
FlutterError.presentError(details);
};
runApp(const MyApp());
@jscarl
jscarl / readme.md
Created January 14, 2023 02:35
Removing Flutter Starter Comment

pubspec.yaml file #.*

main.dart file \/\/.*

@jscarl
jscarl / AdbCommands
Created October 31, 2019 17:27 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@jscarl
jscarl / semantic-commit-messages.md
Created October 26, 2019 13:34 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@jscarl
jscarl / gist:ffc95354e4954812a535aa8d24536941
Created August 12, 2019 11:49 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@jscarl
jscarl / main.dart
Created May 31, 2019 14:50
Simple counter to implement provider approach for flutter.
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@jscarl
jscarl / InputMask.html
Created September 3, 2018 07:45 — forked from JoeMeeks/InputMask.html
Custom Ionic 2 & 3 Input Mask Directive
<ion-input type="tel" pattern="\d*" placeholder="(xxx) xxx-xxxx" mask="(***) ***-****" [(ngModel)]="phone" name="phone"></ion-input>
<ion-input type="tel" pattern="\d*" placeholder="xxx-xx-xxxx" mask="***-**-****" [(ngModel)]="ssn" name="ssn"></ion-input>