Skip to content

Instantly share code, notes, and snippets.

View waar19's full-sized avatar
🏠
Coding from Home

Wilmer Alzate Roman waar19

🏠
Coding from Home
View GitHub Profile
@Klerith
Klerith / email_regexp.dart
Created March 3, 2023 20:50
Flutter / Dart - Email RegExp
final emailRegExp = RegExp(
r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$',
);
@Klerith
Klerith / flutter-instalaciones.md
Last active May 10, 2025 15:57
Instalaciones del curso de Flutter - Móvil de cero a experto
@Klerith
Klerith / Dockerfile
Last active May 10, 2025 05:25
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
# Build the app with cache dependencies
FROM node:18-alpine3.15 AS builder
@ZeroInfinityXDA
ZeroInfinityXDA / Notes.md
Last active August 28, 2024 15:46 — forked from rupansh/Notes.md
Android P semi-GSI notes
@ftvs
ftvs / PhonecallReceiver.java
Last active March 27, 2025 05:56
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: Gabe Sechan http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@akshay1188
akshay1188 / whatsapp-image-compression
Last active June 10, 2023 16:42
Whatsapp like image compression
- (UIImage *)compressImage:(UIImage *)image{
float actualHeight = image.size.height;
float actualWidth = image.size.width;
float maxHeight = 600.0;
float maxWidth = 800.0;
float imgRatio = actualWidth/actualHeight;
float maxRatio = maxWidth/maxHeight;
float compressionQuality = 0.5;//50 percent compression
if (actualHeight > maxHeight || actualWidth > maxWidth) {