Skip to content

Instantly share code, notes, and snippets.

View valterh4ck3r's full-sized avatar
🏠
Working from home

Valter Negreiros valterh4ck3r

🏠
Working from home
View GitHub Profile
@valterh4ck3r
valterh4ck3r / build_runnder.sh
Created October 7, 2020 22:54
Flutter - Mobx Code Gen Delete Conflicts
flutter packages pub run build_runner watch --delete-conflicting-outputs
@DeyvidJLira
DeyvidJLira / bottom_navigation_with_tab_bar_screen.dart
Created April 27, 2019 17:11
Create screen in the Flutter with TabBar in only one of the item of the bottom navigation bar.
import 'package:flutter/material.dart';
class TabBarWithBottomNavigationScreen extends StatefulWidget {
@override
_TabBarWithBottomNavigationScreenState createState() => _TabBarWithBottomNavigationScreenState();
}
class _TabBarWithBottomNavigationScreenState extends State<TabBarWithBottomNavigationScreen> with SingleTickerProviderStateMixin {
import 'package:flutter/material.dart';
import 'dart:math' as math;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
@marcusedu
marcusedu / patterns.dart
Last active December 11, 2019 05:14
Expressões regulares de uso comum
final RegExp email = RegExp(
r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]"
r"{0,253}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,253}[a"
r"-zA-Z0-9])?)*$",
caseSensitive: false,
multiLine: false);
final RegExp mobileBrazilianPhone = RegExp(r"^\(?0?\d{2}\)? ?9 ?\d{4}-?\d{4}$",
caseSensitive: false, multiLine: false);
@valterh4ck3r
valterh4ck3r / cnpj.pipe.ts
Created July 13, 2018 20:42
Angular Pipe CNPJ
@Pipe({name: 'cnpj'})
export class CNPJPipe implements PipeTransform {
transform(value) {
return value.replace(/(\d{2})(\d{3})(\d{3})(\d{4})(\d{2})/g,"\$1.\$2.\$3\/\$4\-\$5")
}
}
@andrelsmoraes
andrelsmoraes / bottom_sheet.dart
Created June 22, 2018 21:03
Modal Bottom Sheet with Input Fields fix for Flutter (Fix issue with overlap with keyboard and fix for tapping to dismiss) - Flutter Version: Channel beta, v0.5.1
// Copyright 2015 The Chromium 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 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@collinjackson
collinjackson / main.dart
Last active August 17, 2023 20:06
PageView example with dots indicator
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
@wesleybliss
wesleybliss / docker-compose-node-mongo.yml
Created September 9, 2016 21:37
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@iChintanSoni
iChintanSoni / SharedPreferenceUtils.java
Last active December 5, 2018 01:52
Utility class for working with SharedPreferences
import android.content.Context;
import android.content.SharedPreferences;
public class SharedPreferenceUtils {
private static SharedPreferenceUtils mSharedPreferenceUtils;
protected Context mContext;
private SharedPreferences mSharedPreferences;
private SharedPreferences.Editor mSharedPreferencesEditor;
private SharedPreferenceUtils(Context context) {