π€
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
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi |
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:developer'; | |
| import 'package:dio/dio.dart'; | |
| class PointStackLocation { | |
| double? latitude; | |
| double? longitude; | |
| String? type; | |
| double? distance; | |
| String? name; | |
| double? confidence; |
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
| version: '3.8' | |
| services: | |
| db: | |
| container_name: pg_container | |
| image: postgres | |
| restart: always | |
| environment: | |
| POSTGRES_USER: root | |
| POSTGRES_PASSWORD: root | |
| POSTGRES_DB: test_db |
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
| version: '3.7' | |
| services: | |
| mongodb_container: | |
| image: mongo:latest | |
| ports: | |
| - 27017:27017 | |
| volumes: | |
| - mongodb_data_container:/data/db | |
| volumes: |
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
| // Note: This is a simple way to read CSV file with Flutter Web | |
| // You must add those packages to make the code work: | |
| // - csv | |
| // - file_picker_web | |
| Future<void> importCSV() async { | |
| // Using the file_picker_package to get the file | |
| final csvFile = await FilePicker.platform.pickFiles( | |
| allowMultiple: false, | |
| withData: true, |
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
| async uploadFile(file) { | |
| const url = `https://api.cloudinary.com/v1_1/${process.env.CLOUDINAY_CLOUD_NAME}/upload`; | |
| const fd = new FormData(); | |
| fd.append( | |
| "upload_preset", | |
| process.env.PRESET_ID | |
| ); | |
| fd.append("tags", "browser_upload"); | |
| fd.append("file", file); |
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:developer'; | |
| import 'package:hive/hive.dart'; | |
| /// A simple class to store as static strings your boxes names | |
| class HiveClassName { | |
| static const String user = "user"; | |
| } | |
| /// I often add those lines: | |
| /// try { |
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 | |
| # We retrieve all remote branches avalaible | |
| values=$(git branch -r) | |
| # Split them everytime we find a space character ' ' to get an array | |
| values_array=(${values//' '/ }) | |
| # Then get the length of the array | |
| length=${#values_array[@]} |