Skip to content

Instantly share code, notes, and snippets.

@dmslabsbr
dmslabsbr / printVar.dart
Created February 21, 2024 20:16
Useful Custom Action to help debug Flutterflow code.
// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/supabase/supabase.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
@dmslabsbr
dmslabsbr / getURLparameters.dart
Last active February 8, 2024 21:03
get URL page parameters Flutter & Flutterflow
// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/schema/enums/enums.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
@dmslabsbr
dmslabsbr / month_year_picker.dart
Created February 2, 2024 19:35
Simple Month Year Picker Widget
// Automatic FlutterFlow imports
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
class MonthYearPicker extends StatefulWidget {
@dmslabsbr
dmslabsbr / geraPdf.dart
Created November 23, 2023 20:08
FlutterFlow PDF Action Code
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
@dmslabsbr
dmslabsbr / DynamicIconRender.dart
Last active November 14, 2023 20:30
Flutter / Flutterflow DynamicIconRender with toolTip
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/actions/actions.dart' as action_blocks;
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/widgets/index.dart'; // Imports other custom widgets
import '/custom_code/actions/index.dart'; // Imports custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
@dmslabsbr
dmslabsbr / CompareSubdirSizesProgress.sh
Last active November 5, 2023 02:32
This guide provides a clear overview of what the script does, how to use it, and what to expect from it. Additionally, remember to adapt the license section as needed to suit the actual license under which you are releasing the script.
#!/bin/bash
# Nome: CompareSubdirSizesProgress.sh
# Defina o diretório padrão ou aceite via argumentos de linha de comando
DIR1=${1:-"/Users/dms/Library/CloudStorage/Dropbox"}
DIR2=${2:-"/Volumes/hd4tb/BKP_do_MAC/Dropbox"}
# Função para calcular o tamanho dos subdiretórios
@dmslabsbr
dmslabsbr / ha_post_temp.sh
Created November 4, 2023 01:59
Bash scripts to send pve sensors temperature to home assistant
#!/bin/bash
# Configurações do Home Assistant
url_base="http://192.168.50.201:8123/api/states"
token="lzRSxMt1dtk"
# Nome do servidor
srv_name="pve"
# Constants for device info
@dmslabsbr
dmslabsbr / getURLparameters.dart
Created October 30, 2023 21:24
FlutterFlow Action Codes
// Automatic FlutterFlow imports
import '/backend/schema/structs/index.dart';
import '/backend/supabase/supabase.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
@dmslabsbr
dmslabsbr / deleteSupabaseFile.dart
Created September 5, 2023 20:49
Functions to use Supabase Storage in flutterflow
import 'package:supabase_flutter/supabase_flutter.dart';
/**
deleta arquivo no supabase
*/
Future<bool> deletaArquivoSupabase(String bucketName, String fileName) async {
print("Action: deletaArquivoSupabase");
bool resultado = false;
@dmslabsbr
dmslabsbr / docker-container-network.sh
Created August 16, 2023 21:04
Obtém a rede que o container Docker está utilizando
#!/bin/bash
# Nome do container Docker
CONTAINER_NAME="your_container_name_here"
# Obtém a rede que o container Docker está utilizando
NETWORK_NAME=$(docker inspect $CONTAINER_NAME --format '{{range .NetworkSettings.Networks}}{{.NetworkID}}{{end}}')
# Exporta a rede como uma variável de ambiente
export DOCKER_CONTAINER_NETWORK=$NETWORK_NAME