Skip to content

Instantly share code, notes, and snippets.

View hellofaizan's full-sized avatar
👨‍💻
Writing Code For Errors

Mohammad Faizan hellofaizan

👨‍💻
Writing Code For Errors
View GitHub Profile
@hellofaizan
hellofaizan / ytimg.js
Created March 7, 2023 15:34 — forked from dustinrouillard/ytimg.js
CloudFlare worker for first available YouTube thumbnail (maxresdefault or hqdefault)
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
});
async function fetchImage(id, type = 'maxresdefault') {
const req = await fetch(`https://i.ytimg.com/vi/${id}/${type}.jpg`);
if (req.status != 200) return await fetchImage(id, 'hqdefault');
return req;
};
@hellofaizan
hellofaizan / ChapterInfoActivity.kt
Created February 2, 2023 06:10 — forked from ikhlaqmalik13/ChapterInfoActivity.kt
API Integration With Kotlin for Getting Quranic Surah's
package com.maple.kashin.learning
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.Html
import android.util.Log
import android.widget.Toast
import com.maple.kashin.databinding.ActivityChapterInfoBinding
import com.maple.kashin.learning.models.ChapterInfo
import com.maple.kashin.learning.models.QuranicChapterInfoResponseModel