Skip to content

Instantly share code, notes, and snippets.

View maheshmnj's full-sized avatar
💭
Bring it on 🔥

Mahesh Jamdade maheshmnj

💭
Bring it on 🔥
View GitHub Profile
@cfreshman
cfreshman / wordle-answers-alphabetical.txt
Last active March 9, 2024 17:43
Original Wordle answers from source code in alphabetical order. And if you write a solver, here's a leaderboard! https://freshman.dev/wordle/leaderboard Additional allowed guesses: https://gist.github.com/cfreshman/cdcdf777450c5b5301e439061d29694c NYTimes version: https://gist.github.com/cfreshman/a7b776506c73284511034e63af1017ee
aback
abase
abate
abbey
abbot
abhor
abide
abled
abode
abort
@maheshmnj
maheshmnj / android.md
Last active March 12, 2024 03:49
Native Android hacks

Table of Contents

  1. Install apk from Appbundle

  2. App not compatible for android 12 Issue

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver
with intent filter, but without the 'android:exported' property set. This file can't be installed
on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported
@maheshmnj
maheshmnj / darkmode.dart
Last active March 29, 2024 13:55
Sample code showing dark mode transition similar to Telegram in flutter with circular transition. Blog Post: https://maheshmnj.medium.com/leveraging-clippaths-in-flutter-a5f34c795ae5
class DarkTransition extends StatefulWidget {
const DarkTransition(
{required this.childBuilder,
Key? key,
this.offset = Offset.zero,
this.themeController,
this.radius,
this.duration = const Duration(milliseconds: 400),
this.isDark = false})
: super(key: key);
@maheshmnj
maheshmnj / multidirection.dart
Last active July 24, 2021 11:21
flutter multidirectional listview (tap,scrollXY,zoom)
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
@phortuin
phortuin / postgres.md
Last active April 30, 2024 02:26
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

This is a pattern I came up with when I was working on a fairly large one person app (25k LOC, legal/regulation calculator, lots of unit testing). It is very simple and very effective.

The short version is you have a RootStore that listens to all of it's child stores. Each store has an async initState method and a dispose method. Make observer mixins for platform channel related items like App Lifecycle, Geolocation, Geofencing that add more lifecycle methods to these stores and manage their own initState/dispose.

I realize that a gist is going to look like a bit of a cluster for something of this nature but I bet if you pull it all down into a project and start playing around with it you'll really enjoy it. Especially now that provider has context.select.

Here's an example of my folder structure in lib/features as a bit of a bonus

@umanghome
umanghome / index.js
Created April 29, 2021 09:29
Do we have vaccination slots for 25 year olds yet?
/**
* run `npm init -y`
* run `npm i node-fetch`
* run `node index.js`
* turn Slack notifications on
*
* Get cowinUrl from the DevTools' network tab
* Get authorization string from the Request Headers as the value of authorization header of the network request for cowinUrl. If this expires, the script will stop working. You'll have to log in again and get a new value for this.
*/
@wilsonowilson
wilsonowilson / distortion.dart
Created March 17, 2021 19:05
Widget warping and distortion in Flutter
import 'dart:typed_data';
import 'dart:ui' hide Image;
import 'package:image/image.dart' as img_lib;
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
enum ImageFetchState { initial, fetching, fetched }
class ImagePlayground extends StatefulWidget {
@maheshmnj
maheshmnj / adb.md
Last active November 8, 2023 18:29
Adb Push file to phone from laptop

adb push (Send data from Desktop to Target phone)

adb push ~/Desktop/notifications.drawio ./storage/emulated/0/Download
e.g
$ adb push ~/Documents/workspace/mobile-app/build/app/outputs/flutter-apk/app-release.apk ./storage/emulated/0/Download

image