Skip to content

Instantly share code, notes, and snippets.

View k4zek4ge's full-sized avatar

k4zek4ge k4zek4ge

View GitHub Profile
PlutoGridStateManager.initializeRowsAsync(
columns,
fetchedRows,
).then((value) {
stateManager.refRows.addAll(FilteredList(initialList: value));
stateManager.notifyListeners();
});
@k4zek4ge
k4zek4ge / main.dart
Last active November 28, 2023 14:45
[receiving plutogrid events] #flutter https://github.com/bosskmk/pluto_grid/issues/633
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:pluto_grid/pluto_grid.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(
chipTheme: const ChipThemeData(
selectedColor: Colors.blueAccent,
),
),
@k4zek4ge
k4zek4ge / main.sh
Created October 22, 2023 07:28
[Thorium browser install] #linux
wget https://dl.thorium.rocks/debian/dists/stable/thorium.list
sudo mv thorium.list /etc/apt/sources.list.d/
sudo apt update
sudo apt install thorium-browser
#Update packages list
sudo apt-get update
#Upgrade packages
sudo apt-get upgrade
#Install update-manager-core package
sudo apt-get install update-manager-core
#Upgrade distro
sudo apt-get dist-upgrade
#Update Ubuntu to the latest LTS release
@k4zek4ge
k4zek4ge / main.txt
Created October 9, 2023 17:53
[Self host pocketbase with Docker and Docker Compose] #pocketbase https://github.com/pocketbase/pocketbase/discussions/3279
1- create a docker file
FROM alpine:latest
ARG PB_VERSION=0.18.1
RUN apk add --no-cache \
unzip \
ca-certificates
@k4zek4ge
k4zek4ge / main.dart
Created October 5, 2023 07:27
[stick row to bottom] #flutter
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Stick Row to Bottom',
theme: ThemeData(primarySwatch: Colors.blue),
@k4zek4ge
k4zek4ge / main.dart
Last active October 4, 2023 17:24
[pluto grid checked rows] #flutter
stateManager.rows
//You can access rows in List type.
//However, if they are filtered, you can only access them.
stateManager.refRows.originalList
//Same as rows, but you can access all rows regardless of filtering or not.
//Every row has a cells property and this is a map.
@k4zek4ge
k4zek4ge / main.sh
Created October 1, 2023 09:56
[docker install] #linux
curl -fsSL https://get.docker.com | sudo sh
Struggled with web authentication for a while several errors, but this error was one of them.
My organization does not participate in MPN, and the Microsoft Azure side had some changes recently that don't seem to be reflected in current discussion threads, seems like many options have been rebranded or renamed.
Lot's of different errors from Pocketbase from all different Azure test implementations. Below is what worked for me for a web app implementation:
Start by logging in to the Azure portal, navigating to Azure>Microsoft Entra ID>Home>Default Directory>App Registrations
Add a new application, fill in as many details as make sense. Navigate to the dashboard for that app.
Configure app as Web Client (NOT SPA, even if your app is an SPA), the code challenge will fail otherwise.