Skip to content

Instantly share code, notes, and snippets.

View hmshohrab's full-sized avatar
🎯
Focusing

Md Shohrab Hossen hmshohrab

🎯
Focusing
View GitHub Profile
@hmshohrab
hmshohrab / EnsureQueueListenerIsRunning.php
Created January 14, 2022 08:41 — forked from ivanvermeyen/EnsureQueueListenerIsRunning.php
Ensure that the Laravel queue listener is running with "php artisan queue:checkup" and restart it if necessary. You can run this automatically with a cron job: http://laravel.com/docs/scheduling
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class EnsureQueueListenerIsRunning extends Command
{
/**
* The name and signature of the console command.
@hmshohrab
hmshohrab / RealPathUtil.java
Created July 15, 2021 17:41 — forked from tatocaster/RealPathUtil.java
Real Path Utility class for Android, works for all API
public class RealPathUtil {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 11) {
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri);
}
// SDK >= 11 && SDK < 19
else if (Build.VERSION.SDK_INT < 19) {