Skip to content

Instantly share code, notes, and snippets.

View felipecastrosales's full-sized avatar
🏆
Trabalhe, sirva, seja forte e não encha o saco!

Felipe Sales felipecastrosales

🏆
Trabalhe, sirva, seja forte e não encha o saco!
View GitHub Profile
@SashaKryzh
SashaKryzh / flutter_extension_methods.dart
Last active April 30, 2024 05:54
List of my favorite extension methods in Flutter.
import 'package:flutter/material.dart';
extension BuildContextExtensions on BuildContext {
ThemeData get theme => Theme.of(this);
TextTheme get textTheme => theme.textTheme;
ColorScheme get colorScheme => theme.colorScheme;
DefaultTextStyle get defaultTextStyle => DefaultTextStyle.of(this);
@daltonmenezes
daltonmenezes / pixelToRem.ts
Created February 16, 2022 02:38
A pixel to rem utility function
function pixelToRem(...values: number[]) {
return values
.reduce((acc, current) => (acc += current / 16 + `rem `), "")
.trim();
}
pixelToRem(13, 20) // 0.8125rem 1.25rem
@eduardoflorence
eduardoflorence / main.dart
Last active April 10, 2024 10:40
Getx - Sample Form
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(
initialRoute: '/login',
getPages: [
GetPage(
name: '/login',
page: () => LoginPage(),
@jtlapp
jtlapp / changenotifierprovider_counter.dart
Last active December 3, 2022 15:32
Counter app implemented with ChangeNotifierProvider
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@matthewzring
matthewzring / markdown-text-101.md
Last active May 24, 2024 04:57
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@trusktr
trusktr / image-grid.md
Last active May 14, 2024 17:19
Image grid in Markdown
screen shot 2017-08-07 at 12 18 15 pm blah screen shot 2017-08-07 at 12 18 15 pm screen shot 2017-08-07 at 12 18 15 pm
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 24, 2024 10:28
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@wojteklu
wojteklu / clean_code.md
Last active May 24, 2024 10:44
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@parmentf
parmentf / GitCommitEmoji.md
Last active May 24, 2024 00:27
Git Commit message Emoji
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 23, 2024 12:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository