In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
var express = require('express'); | |
var http = require('http'); | |
var app = express(); | |
// Simple user controller implementation. | |
var users = [ | |
{ username: 'jamsesso', age: 20, gender: 'M' }, | |
{ username: 'bettycrocker', age: 20, gender: 'F' } | |
]; |
#!/bin/bash | |
# Logout current GitHub credentials and remove global user.name, user.email | |
echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase | |
git config --unset-all --global user.name | |
git config --unset-all --global user.email |
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss |
import 'package:firebase_storage/firebase_storage.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error } | |
class FirebaseStorageImage extends StatefulWidget { | |
/// The reference of the image that has to be loaded. | |
final StorageReference reference; | |
/// The widget that will be displayed when loading if no [placeholderImage] is set. |
## Flutter wrapper | |
-keep class io.flutter.app.** { *; } | |
-keep class io.flutter.plugin.** { *; } | |
-keep class io.flutter.util.** { *; } | |
-keep class io.flutter.view.** { *; } | |
-keep class io.flutter.** { *; } | |
-keep class io.flutter.plugins.** { *; } | |
# Basic ProGuard rules for Firebase Android SDK 2.0.0+ | |
-keep class com.firebase.** { *; } |
import 'package:intl/intl.dart'; | |
import 'package:meta/meta.dart'; | |
void main() { | |
print(DateUtils.formatISOTime(DateTime.now())); | |
print(DateUtils.getCurrentISOTimeString()); | |
} | |
class DateUtils { |
import 'dart:async'; | |
import 'package:dio/dio.dart'; | |
import 'package:flutter/cupertino.dart'; | |
/// [LoggingInterceptor] is used to print logs during network requests. | |
/// It's better to add [LoggingInterceptor] to the tail of the interceptor queue, | |
/// otherwise the changes made in the interceptor behind A will not be printed out. | |
/// This is because the execution of interceptors is in the order of addition. | |
class LoggingInterceptor extends Interceptor { |
# This is a basic workflow to help you get started with Actions | |
name: Test, Build, Release Demo app to Azure Storgae | |
# name: Test, Build and Release apk | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] |
import 'package:flutter/material.dart'; | |
import 'package:workozy_app/widgets/helper/stream_error_widget.dart'; | |
import 'package:workozy_app/widgets/helper/stream_loading_widget.dart'; | |
typedef OnData<T> = Widget Function(T data); | |
typedef OnError = Widget Function(dynamic e); | |
typedef OnLoading = Widget Function(); | |
class MyStreamBuilder<T> extends StatelessWidget { | |
MyStreamBuilder({ |