Skip to content

Instantly share code, notes, and snippets.

View WahdanZ's full-sized avatar
🐧
Bazinga!!

Ahmed Wahdan WahdanZ

🐧
Bazinga!!
View GitHub Profile
@WahdanZ
WahdanZ / test
Created January 2, 2022 22:41
test
test
@WahdanZ
WahdanZ / Fastfile_ios.rb
Created August 6, 2021 21:55 — forked from bbedward/Fastfile_ios.rb
CI/CD In Flutter using GitLab and Fastlane Tutorial
# Automatically update fastlane
update_fastlane
default_platform(:ios)
# Default temporary keychain password and name, if not included from environment
TEMP_KEYCHAIN_NAME_DEFAULT = "fastlane_flutter"
TEMP_KEYCHAN_PASSWORD_DEFAULT = "temppassword"
# Remove the temporary keychain, if it exists
@WahdanZ
WahdanZ / ImageCompres.dart
Created May 8, 2021 01:29
compres image flutter dart
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:image/image.dart' as Im;
import 'package:path_provider/path_provider.dart' show getTemporaryDirectory;
Future<File> imageCompress(File file,{int maxFileSize = 3}) async {
Im.Image image = Im.decodeImage( file.readAsBytesSync());
Im.Image smallerImage = Im.copyResize(image, width: image.width ~/ 2);
final appPath = await getTemporaryDirectory();
file = File('${appPath.path}/img_c${DateTime.now().millisecondsSinceEpoch}.jpg')
@WahdanZ
WahdanZ / main.dart
Last active June 24, 2020 22:55
Extension Iterable
void main() {
final list = ['a', 'b', 'c'];
list.mapIndex((i, index) {
print("item $i inddex $index ");
}).toList();
print("===============");
list.forEachIndex((i, index) {
print("item $i inddex $index ");
void main() {
final Get get = Get();
print(get.get);
}
class Get {
String get get => "Hello Get";
}
@WahdanZ
WahdanZ / mail.js
Last active May 15, 2019 21:25
mail adapter for parse server
const sendmail = require('sendmail')({ silent: true });
const nodemailer = require('nodemailer');
class Mail {
constructor(options) {
this.transporter = null;
this.options = Object.assign({
smtp: null,
verificationSubject: 'Please activate your email address',
public class PhoneUtils {
public static final String TAG = "PhoneUtils";
private static PhoneNumberUtil phoneNumberUtil = PhoneNumberUtil.getInstance();
public static Phonenumber.PhoneNumber getValidPhoneNumber(String countryCode, String phoneNumberStr) {
return getValidPhoneNumber(countryCode.concat(phoneNumberStr));
}
public static String getValidPhoneNumberStr(String countryCode, String phoneNumberStr) {
@WahdanZ
WahdanZ / ColoredText.kt
Last active July 6, 2018 18:43
Extension Functions Help You To Color your text easily, multi Color TextView more info https://github.com/WahdanZ/ColoredText
import android.os.Build
import android.text.Html
import android.widget.Button
import android.widget.TextView
/**
* Created by ahmedwahdan
*/
var TextView.coloredText: String
get() {
@WahdanZ
WahdanZ / Api.java
Created February 17, 2018 16:02 — forked from imminent/Api.java
Call retrying with Retrofit 2.0
package com.example.api;
import java.util.Map;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
public interface Api {
<?xml version="1.0" encoding="utf-8"?>
<data>
<messages>
<ccp_dialog_title translation="اختار دولة"/>
<ccp_dialog_search_hint_message translation="بحث"/>
<ccp_dialog_no_result_ack_message translation=" لا يوجد نتائج"/>
</messages>
<countries>
<country