Skip to content

Instantly share code, notes, and snippets.

@eduardoflorence
eduardoflorence / main.dart
Created December 14, 2020 22:48
GetX - Sample TabBar
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(GetMaterialApp(home: Home()));
}
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
@JosLuna98
JosLuna98 / try_catch_loop.dart
Last active April 14, 2022 23:27
[Dart] Try-catch in a while loop that retries a code after a specific duration time for a specific number of times
import 'dart:async';
import 'package:flutter/foundation.dart';
void main() {
FutureOr<void> tryCatchLoop({
@required FutureOr<void> Function() code,
@required FutureOr<void> Function(dynamic error) onError,
Duration duration = const Duration(milliseconds: 200), int limitTimes = 5
}) async {
int count = 0;
@miohtama
miohtama / launch.json
Created February 13, 2020 22:29
Launching Jest e2e+NestJS from Visual Studio Code - so you can hit breakpoints
// https://github.com/microsoft/vscode-recipes/tree/master/debugging-jest-tests
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
@Klerith
Klerith / plugins.md
Last active March 3, 2025 00:35
Flutter: Curso de Flutter - Instalaciones recomendadas

Programas

git config --global user.name "Tu nombre"
git config --global user.email "Tu correo"
@SeanSobey
SeanSobey / portainer.md
Last active June 12, 2024 07:40
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

@EudesSilva
EudesSilva / commons-proxy.sh
Last active January 7, 2025 03:52
Config proxy in Git, Yarn, Bower, NPM, Maven, Docker, Gradle, General
#Configuration Proxy
#Git
git config --global http.proxy http://<username>:<password>@<proxy-port>
git config --global https.proxy http://<username>:<password>@<proxy-port>
@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active October 4, 2024 08:30
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html