Skip to content

Instantly share code, notes, and snippets.

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

Ahmed Wahdan WahdanZ

🐧
Bazinga!!
View GitHub Profile
@passsy
passsy / main.dart
Created December 2, 2021 13:59
Example of a stacked card list in flutter using Slivers
import 'dart:math';
import 'package:flutter/material.dart';
void main() {
runApp(Kata());
}
class Kata extends StatelessWidget {
@override
@bbedward
bbedward / Fastfile_ios.rb
Last active December 22, 2022 14:02
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
@rodydavis
rodydavis / flutter_github_ci.yml
Last active February 25, 2024 05:40
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@slightfoot
slightfoot / single_top.dart
Last active June 19, 2022 11:15
Recreating Android Single-Top Activity behaviour with Flutter Route's - by Simon Lightfoot
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@sngvahmed
sngvahmed / Shared Module React And React Native.md
Last active January 21, 2023 12:42
Shared Module React And React Native

Hello Devs

i will try to summaize how to build application React native and React web View with same component and logic

Let's start with Simple login

MobileView WebView

Same Component, Same Login Service but different view

@OleksandrKucherenko
OleksandrKucherenko / KeyboardHelper.java
Last active May 2, 2021 18:50
Helper class that help to track opening/close of virtual keyboard in activity/fragment.
// Author: Oleksandr Kucherenko, 2016-present
package your.package.android.utils;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
@zackshapiro
zackshapiro / index.js
Last active March 3, 2023 10:06
Parse Separate Live Query Server Setup
// This is the index.js file for my Parse Live Query Server, running on a separate EC2 instance
var express = require('express');
var cors = require('cors')
var ParseServer = require('parse-server').ParseServer;
var app = express();
app.use(cors());
// We include the lines below so that we can hit `/` and it passes the Elastic Beanstalk Health Check
@magneticflux-
magneticflux- / LiveDataUtils.kt
Last active February 3, 2023 19:08
Helpful Android-Kotlin LiveData utilities
//--------------------------------
// CHECK THE COMMENTS FOR UPDATES!
//--------------------------------
/*
* Copyright (C) 2017 Mitchell Skaggs, Keturah Gadson, Ethan Holtgrieve, Nathan Skelton, Pattonville School District
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@imminent
imminent / Api.java
Last active June 13, 2023 02:50
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 {
@minorbug
minorbug / timeago.swift
Created November 7, 2014 15:28
"Time ago" function for Swift (based on MatthewYork's DateTools for Objective-C)
func timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String {
let calendar = NSCalendar.currentCalendar()
let unitFlags = NSCalendarUnit.CalendarUnitMinute | NSCalendarUnit.CalendarUnitHour | NSCalendarUnit.CalendarUnitDay | NSCalendarUnit.CalendarUnitWeekOfYear | NSCalendarUnit.CalendarUnitMonth | NSCalendarUnit.CalendarUnitYear | NSCalendarUnit.CalendarUnitSecond
let now = NSDate()
let earliest = now.earlierDate(date)
let latest = (earliest == now) ? date : now
let components:NSDateComponents = calendar.components(unitFlags, fromDate: earliest, toDate: latest, options: nil)
if (components.year >= 2) {
return "\(components.year) years ago"