Skip to content

Instantly share code, notes, and snippets.

View orestesgaolin's full-sized avatar
🍪
hello worlds

Dominik Roszkowski orestesgaolin

🍪
hello worlds
View GitHub Profile
@rayliverified
rayliverified / shake_utils.dart
Created May 25, 2020 18:13
Flutter Shake Detection Attempt (algorithm doesn't filter events well)
import 'dart:async';
import 'package:rxdart/rxdart.dart';
import 'package:sensors/sensors.dart';
Stream<bool> isShaking() {
final timeout = Duration(milliseconds: 300);
final accelerationThreshold = 3;
final sampleInterval = Duration(milliseconds: 50);
final moveCountThreshold = 5;
@jeroen-meijer
jeroen-meijer / fluttercleanrecursive.sh
Created September 15, 2019 13:00
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
@slightfoot
slightfoot / multi_select.dart
Last active August 3, 2023 18:10
Multi Select GridView in Flutter - by Simon Lightfoot (Drag to select multiple items) Try now here: https://dartpad.dev/?id=a002dd1e031f5f012f810c6d5da14a11
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@slightfoot
slightfoot / always_scrollbar.dart
Created March 4, 2019 18:20
Always Visible Scrollbar for Flutter - 4th March 2019
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
primaryColor: Colors.indigo,
@LynoDesu
LynoDesu / AndroidHelpers.cs
Created June 20, 2018 19:04
Disable ShiftMode in Xamarin.Forms Android BottomNavigationView
using System;
using Android.Support.Design.Internal;
using Android.Support.Design.Widget;
namespace MyProject.App.Droid.Helpers
{
public static class AndroidHelpers
{
public static void SetShiftMode(this BottomNavigationView bottomNavigationView, bool enableShiftMode, bool enableItemShiftMode)
{
@marcin-chwedczuk
marcin-chwedczuk / dotnetomaniak-1.md
Created June 8, 2018 19:33
Kiedy unikać async/await w wyrażeniach lambda

Od pewnego czasu do pisania testów jednostkowych używam bibliotek XUnit, NSubstitute oraz NFluent. Zwłaszcza ta ostatnia przypadła mi do gustu.

Jedną z metod oferowanych przez NFluent jest Check.ThatAsyncCode(...), na przykład:

Check
    .ThatAsyncCode(() => Task.Delay(0))
    .DoesNotThrow();
@kuhlenh
kuhlenh / .editorconfig
Last active October 4, 2021 04:56
Roslyn .NET OSS (WIP)
###############################
# Core EditorConfig Options #
###############################
root = true
# All files
[*]
indent_style = space
# Code files
@timothystewart6
timothystewart6 / oh-my-zsh-windows.md
Last active July 6, 2018 17:31
Install oh my zsh on bash on Ubuntu (Linux Subsystem)
@troyfontaine
troyfontaine / 1-setup.md
Last active July 7, 2024 19:30
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.