This file contains 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 | |
# Set the cutoff date 6 months ago | |
cutoff_date=$(date -d "6 months ago" +%Y-%m-%d) | |
# Fetch all branches from the remote repository | |
git fetch --prune | |
# Iterate over each remote branch | |
for branch_with_origin in $(git branch -r --format='%(refname:short)'); do |
This file contains 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 | |
# Root project having .gitmodules | |
PROJECT[0]="." | |
# Another project inside root project having .gitmodules | |
PROJECT[1]="project1" | |
for i in "${PROJECT[@]}" | |
do | |
cd $i |
This file contains 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
class HomePage2 extends StatelessWidget { | |
HomePage2({Key? key}) : super(key: key); | |
final dataMap = <String, double>{ | |
"Flutter": 5, | |
}; | |
final colorList = <Color>[ | |
Colors.greenAccent, | |
]; |
This file contains 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 vs code script purges the old images in 'acr' (Azure Container Registry) via 'az' cli. | |
# Retains only latest 5 in a particular repository | |
# You need to change 'myacr' with your acr name and 'mysubs' with your subscription name. | |
# Make sure az cli is installed and logged in. | |
# | |
# Read more: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auto-purge | |
# azcli: https://github.com/Microsoft/vscode-azurecli | |
# List subscriptions | |
az account list --output table |
This file contains 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
sudo pacman -S clang cmake ninja pkgconf gtk3 |
This file contains 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
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- dev/docker | |
jobs: | |
build: |
This file contains 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
name: Add contributors | |
on: | |
schedule: | |
- cron: '0 0 * * 0' | |
jobs: | |
add-contributors: | |
name: Add contributors to README.md | |
runs-on: ubuntu-latest | |
steps: |
This file contains 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
abstract class ErrorInterceptor extends Interceptor { | |
@override | |
Future onError(DioError err) async { | |
if (err is NoInternetError) { | |
return NoInternetError(); | |
} else if (err.type == DioErrorType.response) { | |
final code = err.response!.statusCode; | |
if (code == 401) { | |
await onUnauthorizedError(); | |
return UnauthorizedError(); |
This file contains 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
# Make sure you run this in valid git repository | |
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'@begin@%s@space@%B@end@' > new-in-this-release.log | |
# You can use following formats below to modify your --pretty output | |
# { | |
# hash: "%H", | |
# abbrevHash: "%h", | |
# treeHash: "%T", | |
# abbrevTreeHash: "%t", |
This file contains 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 PropertyValueNotifier<T> extends ValueNotifier<T> { | |
PropertyValueNotifier(T value) : super(value); | |
@override | |
void notifyListeners() { | |
super.notifyListeners(); | |
} | |
} |
NewerOlder