Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Sasha Prokhorenko minikin

🎯
Focusing
Block or report user

Report or block minikin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.dart
// Copyright (c) 2019 Sasha Prokhorenko.
// Use of this source code is governed by a MIT license.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final List<String> _items = List<String>.generate(
100, (id) => 'https://picsum.photos/id/$id/500/500');
@minikin
minikin / about.md
Last active Nov 25, 2019
Sasha Prokhorenko
View about.md

As a Software Engineer, I have almost a decade of experience in software engineering and in particular, more than six years in the mobile ecosystem.

I've been working for very different products, different markets, and various technologies. For high-profile clients like Philip Morris International, and start-ups on early stages.

Sometimes things that I've done get attention from people and even collect awards like Red Dot or Golden Drum.

I am currently a Senior Software Engineer at Heartbeat Labs. This organization is shaping health care and medicine for the better.

When I have spare time I produce electronic music, read books, or traveling.

@minikin
minikin / list.md
Created Nov 21, 2019
List in SwiftUI is UITableView?
View list.md
2019-11-21 17:13:51.850464+0100 SwiftUI Playground[46324:2989784] [TableView] Warning once only: 
UITableView was told to layout its visible cells and other contents without being in the view hierarchy 
(the table view or one of its superviews has not been added to a window). 
This may cause bugs by forcing views inside the table view to load and perform layout without accurate information 
(e.g. table view bounds, trait collection, layout margins, safe area insets, etc), 
and will also cause unnecessary performance overhead due to extra layout passes. 
Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and 
see what caused this to occur, so you can avoid this action altogether if possible, 
or defer it until the table view has been added to a window. 
View gist:31ec0e38a60b5d67ac0af01bf90100c4
2019-11-21 17:13:51.850464+0100 SwiftUI Playground[46324:2989784] [TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <_TtC7SwiftUIP33_BFB370BA5F1BADDC9D83021565761A4925UpdateCoalescingTableView: 0x7fbb4e802000; baseClass = UITableView; frame = (0 0; 375 812); clipsToBounds = YES; autoresize = W+H; gestureRecognizers =
@minikin
minikin / analysis_options.yaml
Created Oct 14, 2019
Analysis Options for Dart/Flutter projects
View analysis_options.yaml
include: package:pedantic/analysis_options.yaml
analyzer:
errors:
missing_required_param: error
always_put_required_named_parameters_first: error
no_duplicate_case_values: error
avoid_relative_lib_imports: error
linter:
@minikin
minikin / fun.dart
Created Oct 14, 2019
Functional Dart
View fun.dart
const pluckDeep = key => obj => key.split('.').reduce((accum, key) => accum[key], obj)
const compose = (...fns) => res => fns.reduce((accum, next) => next(accum), res)
const unfold = (f, seed) => {
const go = (f, seed, acc) => {
const res = f(seed)
return res ? go(f, res[1], acc.concat([res[0]])) : acc
}
return go(f, seed, [])
@minikin
minikin / user.dart
Created Oct 14, 2019
Extension in Dart
View user.dart
import 'package:flutter/foundation.dart';
class User extends Object {
final String userId;
final String firstName;
final String secondName;
bool isActive;
User({
@required this.userId,
@minikin
minikin / cloudSettings
Last active Oct 28, 2019
cloudSettings
View cloudSettings
{"lastUpload":"2019-10-28T09:56:31.152Z","extensionVersion":"v3.4.3"}
@minikin
minikin / main.dart
Last active Jul 4, 2019
Reduce boilerplates for operator == and hashCode
View main.dart
/// Generates a hash code for multiple [objects].
int hashValues(Iterable objects) => _finish(
objects.fold(0, (hash, element) => _combine(hash, element.hashCode)));
// Jenkins hash functions
int _combine(int hash, int value) {
hash = 0x1fffffff & (hash + value);
hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
return hash ^ (hash >> 6);
}
View CONTRIBUTING.template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
You can’t perform that action at this time.