This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete all local branches that have been merged into master | |
git branch --merged master | grep -v "\* master" | xargs -n 1 git branch - | |
# amend a commit to the current time | |
git commit --amend --date="now" | |
# add empty git commit without adding files | |
git commit --allow-empty -m "This will trigger a build" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file contains the fastlane.tools configuration | |
# You can find the documentation at https://docs.fastlane.tools | |
# | |
# For a list of all available actions, check out | |
# | |
# https://docs.fastlane.tools/actions | |
# | |
# For a list of all available plugins, check out | |
# | |
# https://docs.fastlane.tools/plugins/available-plugins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Build, Release app to Github Pages and Firebase Hosting | |
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
import 'dart:io'; | |
bool get isWeb => kIsWeb; | |
bool get isMobile => !isWeb && (Platform.isIOS || Platform.isAndroid); | |
bool get isDesktop => | |
!isWeb && (Platform.isMacOS || Platform.isWindows || Platform.isLinux); | |
bool get isApple => !isWeb && (Platform.isIOS || Platform.isMacOS); | |
bool get isGoogle => !isWeb && (Platform.isAndroid || Platform.isFuchsia); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MESSAGE="test" | |
TOKEN=$(cat ~/.github-token) | |
FILENAME="$RANDOM-date.txt" | |
CONTENT=$(date | base64) | |
USER="steinbrueckri" | |
REPO="api-test" | |
MESSAGE="hello world" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:firebase/firebase.dart' as firebase; | |
class FBMessaging { | |
FBMessaging._(); | |
static FBMessaging _instance = FBMessaging._(); | |
static FBMessaging get instance => _instance; | |
firebase.Messaging _mc; | |
String _token; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class NameInitialsWidget extends StatelessWidget { | |
final double width; | |
final double height; | |
final String text; | |
final double fontSize; | |
final double margin; | |
const NameInitialsWidget( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension TextExtension on Text { | |
Text h1({TextStyle style}) { | |
TextStyle defaultStyle = TextStyle( | |
fontFamily: 'Nunito_Sans', | |
fontSize: 36, | |
fontWeight: FontWeight.w900, | |
fontStyle: FontStyle.normal, | |
letterSpacing: -0.02, | |
color: SoulphiaTheme.defaultGraySwatch[50], | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension PhoneNumberExtension on String { | |
String get toGHPhoneNumber { | |
if (this.length != 10) return this; | |
return '${this.substring(0, 3)} ${this.substring(3, 6)} ${this.substring(6, 10)}'; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ `git status --porcelain` ]]; then | |
printf "\e[31;1m%s\e[0m\n" 'This script needs to run against committed code only. Please commit or stash you changes.' | |
exit 1 | |
fi | |
printf "\e[33;1m%s\e[0m\n" 'Running the Flutter analyzer' | |
flutter analyze | |
if [ $? -ne 0 ]; then | |
printf "\e[31;1m%s\e[0m\n" 'Flutter analyzer error' | |
exit 1 |