Skip to content

Instantly share code, notes, and snippets.

@ameen-sarsour
ameen-sarsour / PHP apple sign in
Last active September 3, 2024 09:44
this code to try php sign in,
<?php
/**
* This file to test apple sign in,
* Need to app information from Apple
*
* Team Id
* Client Id
* Key Id
* and Private key
@ameen-sarsour
ameen-sarsour / PHP - Flat Array
Last active July 7, 2020 06:58
This Code to flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
<?php
/**
* @param array $array
* @return array Array in fal
*/
function flat(Array $array){
$result = [];
foreach($array as $item){
if(is_array($item)){
@ameen-sarsour
ameen-sarsour / gist:f678d5976c58b46f08d4
Created March 26, 2016 17:46
This code help you to see any body you want,
if (I.think(person))
then give the person
@ameen-sarsour
ameen-sarsour / RoundedImageView.java
Created February 26, 2015 10:27
RoundedImageView with volley
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
@ameen-sarsour
ameen-sarsour / EasyTracker.java
Last active April 17, 2016 21:11
migrate google analytics library for android v2 to v4
import android.app.Activity;
import android.content.Context;
import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Logger;
import com.google.android.gms.analytics.Tracker;
/**