Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding

Ricardo Markiewicz Gazer

💭
Coding
View GitHub Profile
@Gazer
Gazer / .zshrc
Created Jul 23, 2020
Some zsh magic to detect and change the current Flutter version needed by an app in the current directory
View .zshrc
# Add this to your ~/.zshrc AFTER the last export PATH="" that is currenttly defined
# Change these to reflect where do you have Flutter installed
export FLUTTER_STABLE_PATH="$HOME/dev/flutter/bin"
export FLUTTER_BETA_PATH="$HOME/dev/flutter-beta/bin"
export FLUTTER_MASTER_PATH="$HOME/dev/flutter-master/bin"
export BASE_PATH=$PATH
# Using 💙 until we can get a Flutter emoji :)
function useFlutterStable() {
@Gazer
Gazer / scroll_expand_container.dart
Created Jun 5, 2020
Widget that expand to use full height and if needed can scroll
View scroll_expand_container.dart
import 'package:flutter/material.dart';
class ScrollExpandContainer extends StatelessWidget {
final List<Widget> children;
const ScrollExpandContainer({Key key, this.children}) : super(key: key);
@override
Widget build(BuildContext context) {
return LayoutBuilder(
@Gazer
Gazer / main.dart
Created May 20, 2020
Parse Youtube URL to get YoutubeID
View main.dart
// Parse Youtube URL to get YoutubeID
//
void main() {
var url = "https://www.youtube.com/watch?v=xr3pKzqrv70";
var uri = Uri.parse(url);
var v = uri.queryParameters['v'];
print("v=$v");
}
@Gazer
Gazer / firebase-function-mercadopago.js
Created Apr 27, 2020
Create a MercadoPago Preference when a document is created in Firestore
View firebase-function-mercadopago.js
const functions = require('firebase-functions');
const admin = require('firebase-admin');
let FieldValue = require('firebase-admin').firestore.FieldValue;
admin.initializeApp();
const db = admin.firestore();
const express = require('express');
const app = express();
const mercadopago = require('mercadopago');
@Gazer
Gazer / example.dart
Created Feb 4, 2020
Flutter Stack Example
View example.dart
class TestWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(24.0),
child: AspectRatio(
aspectRatio: 3 / 2.0,
child: LayoutBuilder(
builder: (context, BoxConstraints constraints) {
return Stack(
@Gazer
Gazer / demo.dart
Created Apr 25, 2019
SliderWidget API
View demo.dart
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SliderWidget(
icon: Icons.arrow_forward,
text: "Deslizá para transferir",
color: Colors.red,
onSubmit: (Function onFinish, Function onError) async {
await pause(const Duration(seconds: 1));
@Gazer
Gazer / PagerIndicator.java
Created Sep 19, 2016
A simple Page indicator for Android ViewPager
View PagerIndicator.java
package com.example;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Build;
import android.support.v4.view.ViewPager;
@Gazer
Gazer / 0_README.md
Last active Jan 6, 2016
Gradle tasks for code static code analysis on android apps.
View 0_README.md

Gradle Tasks for code static code analysis on android apps.

Credits to : https://github.com/artem-zinnatullin/qualitymatters

Usage :

  • Download all files on this GIST.
  • Put the XML files on your root directory under code_quality_tools/ folder.
  • Put the code_quality_tools.gradle file into your root project directory.
  • On each module you want to check add to the build.gradle the next line : apply from: '../code_quality_tools.gradle'
  • Run "gradlew check"
View on the activity
super.onViewCreated(view, savedInstanceState);
ButterKnife.inject(this, view);
callbackManager = CallbackManager.Factory.create();
facebookLoginButton.setFragment(this);
facebookLoginButton.registerCallback(callbackManager, presenter);
presenter.bindView(this);
@Gazer
Gazer / FragmentMVP.java
Created Dec 24, 2015
Comparación Android Normal vs Android MVP
View FragmentMVP.java
package it.patagonian.argentinamecopa.fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
You can’t perform that action at this time.