Skip to content

Instantly share code, notes, and snippets.

View buzzySmile's full-sized avatar

Alexander Makarov buzzySmile

  • Bishkek City, Kyrgyzstan
View GitHub Profile
@buzzySmile
buzzySmile / Flutter Network.md
Last active February 17, 2025 14:21 — forked from TahaTesser/Flutter Network.md
A collection of active Flutter content creators, newsletters, platforms, and personalities. If you've suggestions, please comment below.
@buzzySmile
buzzySmile / booted_ios_sim_storage.sh
Created November 7, 2021 15:49
Path to currently booted iOS Simulator storage folder
#!/bin/sh
BOOTED_SIM_UUID=$(xcrun simctl list | grep 'Booted' | grep -o -E '[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}' | head -1)
echo 'Path to the booted iOS Simulator storage'
echo ~/Library/Developer/CoreSimulator/Devices/$BOOTED_SIM_UUID
@buzzySmile
buzzySmile / clean_navigation.dart
Created June 11, 2021 12:35
Flutter clean navigation example
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
onGenerateRoute: RouteGenerator.generateRoute,
title: 'Navigation with Arguments',
@buzzySmile
buzzySmile / remove_git_submodule.md
Last active December 25, 2020 17:00
How to remove git submodule

git submodule deinit <path_to_submodule>

git rm <path_to_submodule>

git commit-m "Remove submodule"

rm -rf .git/modules/

@buzzySmile
buzzySmile / mafia_risky_job.dart
Created October 13, 2020 17:02
Exceptions processing in regular+future case
import 'dart:math';
class PoliceException implements Exception {
PoliceException({this.msg});
final String msg;
@override
String toString() => 'Police Raid {$msg}';
}
@buzzySmile
buzzySmile / pretty_vertical_label.dart
Created October 2, 2020 17:50
Flutter vertical outlined label
import 'dart:math' as math;
Transform.rotate(
angle: -math.pi / 2,
child: Material(
shape: ContinuousRectangleBorder(
side: BorderSide(width: 2.0, color: Colors.red),
borderRadius: BorderRadius.circular(4.0),
),
child: Padding(
@buzzySmile
buzzySmile / vscode_shortcuts.md
Created August 25, 2020 17:31 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@buzzySmile
buzzySmile / main.dart
Created March 17, 2020 17:04
factory constructor example
import 'dart:math';
/**
* A `factory function` is a function that returns an instance of a class.
* Dart provides `factory` keyword to label a default or named constructor.
* Then it becomes our responsibility to return an instance from this constructor.
*
* A factor constructor is generally used to control the instance creation.
* For example, we can cache an instance of the class and return the same instance
* when a user is trying to create new object.
@buzzySmile
buzzySmile / git_rebase.md
Created May 30, 2018 13:33 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@buzzySmile
buzzySmile / curl.md
Created May 8, 2018 13:06 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.