Skip to content

Instantly share code, notes, and snippets.

View edoardoc's full-sized avatar

Edoardo Ceccarelli edoardoc

View GitHub Profile
@edoardoc
edoardoc / fyne_free_draw.go
Created September 7, 2023 10:12
fyne v2 free drawing example
package main
import (
"image/color"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/canvas"
"fyne.io/fyne/v2/container"
)
@edoardoc
edoardoc / resetBattery.nsh
Created October 13, 2022 08:01
a quick script to reset the battery usage for a Star LabTop MK III, to be put in /boot/efi/EFI/ and launched from a UEFI shell
mm -io 66 1
stall 1000
mm -io 66 81 -W 1
stall 1000
mm -io 66 1
@edoardoc
edoardoc / plpgsql_query_function_template.sql
Created December 10, 2021 16:53
PL/pgSQL Template to run inline a complicated function and get results in console
-- PL/pgSQL Template to run inline a complicated function and get results in console
DO $$
DECLARE
-- ADD QUERY DECLARATION HERE:
filteringIdOfSomeKind UUID;
-- ADD QUERY DECLARATION HERE -- END!
t timestamptz;
target record;
@edoardoc
edoardoc / RawAutocompleteEddy.dart
Last active April 9, 2021 07:38
my take at the standard flutter autocomplete while unmarshaling a json with a custom type
import 'dart:convert';
import 'package:flutter/material.dart';
class RawAutocompleteEddy extends StatelessWidget {
const RawAutocompleteEddy({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="13">
<profile kind="CodeFormatterProfile" name="Eclipse" version="13">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>