Skip to content

Instantly share code, notes, and snippets.

View iamriajul's full-sized avatar
🏠
Working from home

Riajul Islam iamriajul

🏠
Working from home
View GitHub Profile
@iamriajul
iamriajul / dlink-block-device-from-active-clients.js
Created April 16, 2020 07:42
Block Device Support for D-Link Router from Active Clients
@iamriajul
iamriajul / GlideImageGetter.java
Created May 13, 2020 13:35 — forked from yrajabi/GlideImageGetter.java
Custom Html.ImageGetter to load images in TextView HTML tags using Glide
/*
* Copyright (c) 2020. Yaser Rajabi https://github.com/yrajabi
* Based on code by https://github.com/ddekanski
*/
package com.rahpou.vod.ui.glideutils;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
@iamriajul
iamriajul / GlideImageGetter.kt
Last active October 16, 2023 05:48
Custom Html.ImageGetter to load images in TextView HTML tags using Glide
/*
* Based on java code by Yaser Rajabi https://gist.github.com/yrajabi
*/
package org.dailyislam.android.utils.extenstions
import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.text.Html.ImageGetter
@iamriajul
iamriajul / vue-taggable-select.js
Created August 8, 2020 13:12
robrogers3 / vue-taggable-select, bug fixed, fixed bugs: https://github.com/robrogers3/vue-taggable-select/issues/6
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";var i={mixins:[{watch:{pointe
@override
void initState() {
getLocationData().then((locationData) {
if (mounted) {
return;
}
if (locationData != null) {
setState(() {
prayerTimes = PrayerTimes(
Coordinates(locationData.latitude, locationData.longitude),
@iamriajul
iamriajul / ConnectivityUtil.kt
Created April 26, 2021 05:19
Android Kotlin utility class for checking device's network connectivity and speed and internet availability. - You may use this with DI system easily.
package org.dailyislam.android.utilities
import android.content.Context
import android.net.ConnectivityManager
import android.net.NetworkInfo
import android.telephony.TelephonyManager
import java.net.InetAddress
class ConnectivityUtil(private val applicationContext: Context) {
@iamriajul
iamriajul / image-raw.tsx
Last active February 2, 2024 08:23
An example for Qwik Image component which tries to be SEO Friendly. The image.tsx is the full-featured component, and the image-raw.tsx is bare minimum component.
import {component$, type PropsOf} from "@builder.io/qwik";
import {imgSizes, type ImageSize} from "~/utils/img";
type ImageAttributes = Omit<PropsOf<'img'>, 'children' | 'sizes'>;
export interface ImageRawProps extends ImageAttributes {
sizes?: string | ImageSize[];
defaultSize?: boolean;
sizeMargin?: string | null;
}