Skip to content

Instantly share code, notes, and snippets.

View gladson's full-sized avatar
😎
Vá lutar pelo que você acredita.

Gladson gladson

😎
Vá lutar pelo que você acredita.
View GitHub Profile
@gladson
gladson / load_data_local_infile_users.sql
Last active December 19, 2023 04:21
Dbeaver - LOAD DATA LOCAL INFILE
LOAD DATA LOCAL INFILE 'C:/Users/Gladson/Downloads/users.csv'
INTO TABLE test_db.users_tb
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY ''
LINES TERMINATED BY '\n'
IGNORE 1 LINES
(@name,@email,@password,@age,@gender,@created_at,@updated_at,@deleted_at)
SET name = @name, email = @email, password = @password, age = @age,
gender = @gender, created_at = @created_at, updated_at = @updated_at,
deleted_at = @deleted_at;
@gladson
gladson / Makefile
Created November 19, 2023 07:48
Makefile - ESTUDO
COND_A = NO
COND_B = YES
all:
# AND condition
ifeq ($(COND_A) $(COND_B), YES YES)
@echo "A and B is true"
else
@echo "A and B is false"
endif
@gladson
gladson / mock.json
Last active February 11, 2023 16:16
MARVEL - FILMS LIST
{
"mcu": [
{
"adult": false,
"backdrop_path": "/yFuKvT4Vm3sKHdFY4eG6I4ldAnn.jpg",
"genre_ids": [
28,
12,
878
],
@gladson
gladson / README.md
Last active March 16, 2022 06:00
PODMAN + Cockpit UI for podman + VSCode
version: '3.7'
services:
backend_npm:
container_name: backend_npm
image: jc21/nginx-proxy-manager:latest
restart: always
ports:
# Public HTTP Port:
- 6000:80
# Public HTTPS Port:
@gladson
gladson / radio_button.dart
Created December 20, 2021 10:57
Custom Radio Button - Flutter
import 'package:flutter/material.dart';
const double _kEdgeSize = Checkbox.width * 1.5;
const double _kStrokeWidth = 0.0;
class SRadio<T> extends StatefulWidget {
const SRadio({
Key? key,
required this.value,
required this.groupValue,
@gladson
gladson / checkbox.dart
Last active December 13, 2021 18:37
Custom CheckBox - Flutter
import 'package:flutter/material.dart';
class SCheckbox extends StatefulWidget {
final ValueChanged<bool> onChanged;
final bool isChecked;
final String title;
final double size;
final double iconSize;
final Color selectedColor;
final Color selectedIconColor;
@gladson
gladson / README.md
Last active October 31, 2021 21:13
Dart & Flutter - Log Debugger (Break Point programaticamente) & Timeline (Análise de performance)

import 'dart:developer' as developer;

import 'dart:developer' as developer;

Criar logs com mensagem personalizada

sem o uso do pacote Logger

@gladson
gladson / index.dart
Created August 4, 2021 19:26
SEND ARQUIVO - API
uploadFile() async {
var postUri = Uri.parse("<APIUrl>");
var request = new http.MultipartRequest("POST", postUri);
request.fields['user'] = 'blah';
request.files.add(new http.MultipartFile.fromBytes('file', await File.fromUri("<path/to/file>").readAsBytes(), contentType: new MediaType('image', 'jpeg')))
request.send().then((response) {
if (response.statusCode == 200) print("Uploaded!");
});
}