Skip to content

Instantly share code, notes, and snippets.

View amerblackbird's full-sized avatar

Amer mohammed amerblackbird

View GitHub Profile
@tolo
tolo / cupertino_stateful_nested_navigation.dart
Last active November 21, 2023 22:03
Example showing how to use go_router to build stateful nested navigation, using a CupertinoTabBar. Requires https://github.com/flutter/packages/pull/2650 (or https://github.com/tolo/flutter_packages/tree/nested-persistent-navigation).
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:collection/collection.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
final GlobalKey<NavigatorState> _rootNavigatorKey =
@mael
mael / tricks.md
Last active May 23, 2024 10:01
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

@mohokh67
mohokh67 / fix gitignore.md
Last active September 14, 2023 14:09
Fix the .gitignore and untrack files which are already added

Untrack files which are already added in gitignore file

  1. Commit all your changes

  2. Remove everything from the repository cache. Go to your repo directory and run this command.

git rm -r --cached .

It will only clear the cache. Your files and git history will stay.

@adhipg
adhipg / countries.sql
Created January 12, 2012 11:41
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;