Skip to content

Instantly share code, notes, and snippets.

View ricbermo's full-sized avatar

Ricardo Berdejo ricbermo

  • Fullstack Labs
  • Barranquilla, Colombia
  • 07:54 (UTC -05:00)
  • X @ricbermo
View GitHub Profile
@ricbermo
ricbermo / controller.dart
Created August 18, 2021 23:04
Repository-Provider-Controller Patter
// custom provider to improve lists performance
final currentModel = ScopedProvider<Category>(
(_) => throw UnimplementedError(),
);
// used to display snackbars
final exceptionProvider = StateProvider<CustomException>(
(_) => null,
);
@ricbermo
ricbermo / auth_repository.dart
Created March 5, 2021 00:30
Flutter Code Review
final authRepositoryProvider = StateNotifierProvider<AuthNotifier>(
(ref) => AuthNotifier(ref.read),
);
class AuthNotifier extends StateNotifier<AuthState> {
final Reader _read;
AuthNotifier(this._read) : super(const AuthState()) {
loadUser();
}
Politica de Privacidad
1. No vendemos tus datos
2. No vendemos tus datos
3. No vendemos tus datos
4. No vendemos tus datos
5. No vendemos tus datos

Keybase proof

I hereby claim:

  • I am ricbermo on github.
  • I am ricbermo (https://keybase.io/ricbermo) on keybase.
  • I have a public key ASBPOmPtU4NGltJPgPv2jjvmVB-d-p0GhPR-eJhciqEW1Qo

To claim this, I am signing this object:

@ricbermo
ricbermo / .babelrc
Last active March 29, 2019 23:54
React Native boilerplate: My own RN preferences translated into settings. RN 57+
{
"presets": ["module:metro-react-native-babel-preset"],
"plugins": [
["module-resolver", {
"cwd": "babelrc",
"root": ["./src"],
"alias": {
"theme": "./src/styles/theme",
"env": "./env.js",
},
@ricbermo
ricbermo / fastlane_runner.sh
Last active February 26, 2019 15:55
Fastlane runner for bitrise
#!/usr/bin/env bash
bundle exec fastlane android beta
@ricbermo
ricbermo / SortableGrid.js
Created December 15, 2017 19:23
Custom Block Height for @ollija/react-native-sortable-grid
import React, {Component} from 'react';
import {
StyleSheet,
Animated,
TouchableWithoutFeedback,
PanResponder,
Image,
View,
} from 'react-native';
@ricbermo
ricbermo / database.yml
Created January 13, 2014 14:57
a better database configuration for rails using postgres
defaults: &defaults
adapter: postgresql
template: template0
host: localhost
development:
<<: *defaults
database: (your_app_name)_development
test: &test
@ricbermo
ricbermo / RVM Cheat Sheet
Created April 21, 2014 22:21
RVM Cheat Sheet
RVM home page: https://rvm.io
Install RVM
------------
See https://rvm.io/rvm/install/
curl -L get.rvm.io | bash -s stable
On OS X you can use RailsInstaller which will bring all dependencies for you: