Skip to content

Instantly share code, notes, and snippets.

@Adrek
Adrek / commons-proxy.sh
Created November 3, 2023 15:24 — forked from EudesSilva/commons-proxy.sh
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>
@Adrek
Adrek / auth_retry_interceptor_gist.dart
Created October 6, 2023 15:48 — forked from iamnabink/auth_retry_interceptor.dart
Auth Refresh token retry interceptor for flutter with Dio Package
import 'dart:async';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:sabsewa/networks/api_endpoints.dart';
import 'package:sabsewa/app_config/app_colors.dart';
import 'package:sabsewa/networks/secure_storage.dart';
import 'package:flutter/material.dart';
import 'package:sabsewa/views/utils/toast.dart';
@Adrek
Adrek / device.dart
Created October 2, 2023 15:00 — forked from wangbax/device.dart
Flutter generate a unique device identifier in windows platform.
import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:crypto/crypto.dart';
// Device Manager
class Device {
Device._privateConstructor();
@Adrek
Adrek / php5.6-pgsql.Dockerfile
Created May 22, 2023 22:12 — forked from ben-albon/php5.6-pgsql.Dockerfile
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
@Adrek
Adrek / php-docker-ext
Created May 22, 2023 21:56 — forked from hoandang/php-docker-ext
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/
@Adrek
Adrek / Invalid Host Header NGROK
Created May 4, 2023 00:41 — forked from xola139/Invalid Host Header NGROK
When Invalid Host Header when ngrok tries to connect to Angular or React dev server
When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok.
ngrok http 8080 -host-header="localhost:8080"
ngrok http --host-header=rewrite 8080
@Adrek
Adrek / LoadingModal.vue
Created January 11, 2023 16:01 — forked from Klerith/LoadingModal.vue
Loading Modal con SVG
<template>
<div>
<span>Loading...</span>
<!-- https://codepen.io/nikhil8krishnan/pen/rVoXJa -->
<!-- Loader 6 -->
<svg version="1.1"
width="50"
heigth="50"
id="L6" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
@Adrek
Adrek / Dockerfile
Created December 23, 2022 17:45 — forked from Klerith/Dockerfile
Preparar imagen de Docker - Node App
# Install dependencies only when needed
FROM node:18-alpine3.15 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
@Adrek
Adrek / index.ts
Created October 15, 2022 21:28 — forked from Klerith/index.ts
Vuex + TypeScript - Store Structure Strongly Typed
import { createStore } from 'vuex';
// My custom modules
import exampleModule from './module-template';
import { ExampleStateInterface } from './module-template/state';
export interface StateInterface {
// Define your own store structure, using submodules if needed
// example: ExampleStateInterface;
@Adrek
Adrek / password-property-dto.ts
Created August 20, 2022 15:50 — forked from Klerith/password-property-dto.ts
Password validation - DTO
@IsString()
@MinLength(6)
@MaxLength(50)
@Matches(
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
message: 'The password must have a Uppercase, lowercase letter and a number'
})
password: string;