Skip to content

Instantly share code, notes, and snippets.

View lollopolve's full-sized avatar

Lorenzo Polverelli lollopolve

View GitHub Profile
#!/usr/bin/env bash
go install golang.org/x/tools/gopls@latest
go install github.com/go-delve/delve/cmd/dlv@latest
go install mvdan.cc/gofumpt@latest
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
export function debounce(callback, wait) {
let timeoutId = null;
return (...args) => {
window.clearTimeout(timeoutId);
timeoutId = window.setTimeout(() => {
callback.apply(null, args);
}, wait);
};
}
package main
import (
"fmt"
"time"
)
func main() {
msgs := make(chan string)
@lollopolve
lollopolve / discardable_cards_demo.dart
Last active August 24, 2023 16:23
Swipe the card right in order to discard it
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Cards demo",
debugShowCheckedModeBanner: false,