Skip to content

Instantly share code, notes, and snippets.

View Faiyyaz's full-sized avatar

Mohammed Faiyyaz Khatri Faiyyaz

View GitHub Profile
// Copyright (c) 2018, the Zefyr project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:collection';
import 'dart:convert';
import 'package:quill_delta/quill_delta.dart';
import 'package:notus/notus.dart';
import 'package:html/parser.dart' show parse;
@ponnamkarthik
ponnamkarthik / auto_resize_webview.dart
Created June 5, 2019 04:07
Flutter auto resize webview based on its content
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@mael
mael / tricks.md
Last active July 16, 2024 11:44
Xcode 10.2 "Unable to boot the Simulator"

Solution "Unable to boot the Simulator"

sudo mkdir /private/tmp

sudo chmod 1777 /private/tmp

Other basic command

xcrun

xcrun simctl list devices //to list all simulators

xcrun simctl delete // to delete specific device

@benjaminhorner
benjaminhorner / ScrollTextFieldAboveKeyboard
Last active May 31, 2022 12:21
Scroll UITextField above Keyboard in a UITableView OR UIScrollView in Swift
func keyboardWillShow(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
let contentInsets = UIEdgeInsets(top: self.tableView.contentInset.top, left: 0, bottom: keyboardSize.height, right: 0)
self.tableView.contentInset = contentInsets
// If active text field is hidden by keyboard, scroll it so it's visible
// Your app might not need or want this behavior.
var aRect: CGRect = self.view.frame
aRect.size.height -= keyboardSize.height
let activeTextFieldRect: CGRect?