Skip to content

Instantly share code, notes, and snippets.

View rozd's full-sized avatar
🛸

Max Rozdobudko rozd

🛸
  • Freelance
  • Kyiv, Ukraine
View GitHub Profile
import 'package:flutter/widgets.dart';
// MARK: - Iterable Extensions
extension FlutterishIterable<T> on Iterable<T> {
List<Widget> toWidgets({
required Widget Function(T element) itemBuilder,
Widget Function()? separatorBuilder
}) {
@rozd
rozd / test-data.md
Created May 25, 2018 19:05
Various data

Phone Numbers

South Africa Phone numbers

0822222222

@rozd
rozd / pre-push
Last active January 18, 2021 14:28
pre-push for Swift projects
#!/bin/sh
# Prevent commits containing Tailor errors or warnings to be pushed to remote
remote="$1"
url="$2"
RED='\033[0;31m' # Red Color
NC='\033[0m' # No Color
@rozd
rozd / FormError.swift
Created January 16, 2018 09:32
Invalid Form Error Swift implementation for iOS
//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
// MARK: Transport layer
/// Represents error sent from transport layer
struct TransportError: Error {
let code: Int
@rozd
rozd / CurrentUer.swift
Last active July 12, 2019 19:22
CurrentUser Swift implementation for iOS
//: Playground - noun: a place where people can play
import Foundation
// MARK: Infrastructure
/// Contract for remote user service
protocol UserService {
func signIn(completion handler: (User?) -> ())
}
@rozd
rozd / kill-adl.sh
Last active April 5, 2018 07:50
Kill all ADL processes
#!/bin/sh
echo killing adl...
pkill -HUP adl > /dev/null
echo killed
#
@rozd
rozd / copy_resources.rb
Created July 29, 2016 09:13
Starling-Framework/util/idea/copy_resources.rb
#!/usr/bin/ruby
require "rexml/document"
require "fileutils"
include REXML
platforms = ["ios", "android", "air-desktop"]
script_name = File.basename(__FILE__)
if ARGV.count < 3
@rozd
rozd / FixUnresponsiveTouch.as
Created June 12, 2016 08:56
Fixes issue with significantly short delay between TOUCH_BEGIN and TOUCH_END events at the bottom of the Adobe AIR NOT full screen application.
/**
* Created by max on 6/12/16.
*/
package
{
import flash.display.Stage;
import flash.events.TimerEvent;
import flash.events.TouchEvent;
import flash.utils.Timer;
import flash.utils.getTimer;
@rozd
rozd / HyperlinkTextBlockTextRenderer.as
Created August 15, 2014 11:55
HyperlinkTextBlockTextRenderer
package feathersx.controls.text
{
import feathers.controls.text.TextBlockTextRenderer;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.text.engine.ContentElement;
import flash.text.engine.ElementFormat;
import flash.text.engine.GroupElement;
import flash.text.engine.TextElement;
@rozd
rozd / PlainButton.as
Last active July 14, 2016 09:40
Flash simple button
import flash.display.DisplayObjectContainer;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
class PlainButton extends Sprite
{