Skip to content

Instantly share code, notes, and snippets.

View afsakar's full-sized avatar
🧠

Azad Furkan ŞAKAR afsakar

🧠
View GitHub Profile
@mynameispj
mynameispj / Props
Created July 24, 2012 14:55
Estimated reading time in PHP, by Brian Cray
Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/
function humanize(num){
var ones = ['', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine',
'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen',
'seventeen', 'eighteen', 'nineteen'];
var tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty', 'seventy', 'eighty',
'ninety'];
var numString = num.toString();
if (num < 0) throw new Error('Negative numbers are not supported.');
@Nks
Nks / MediaVideoConverterListener.php
Last active May 16, 2025 09:21
Laravel Media Library converting video to .mp4 after saving
<?php
namespace App\Listeners;
use App\Media;
use FFMpeg\FFMpeg;
use FFMpeg\Format\Video\X264;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\SerializesModels;
@rudSarkar
rudSarkar / vue-route.md
Last active September 14, 2022 20:41
Vue.js Vue Router dynamic route 404 handling to check exist post param or non-exist post param
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active May 18, 2025 07:10
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@deepak-cotocus
deepak-cotocus / Laravel-Queue-Supervisor-configuration.md
Last active March 14, 2025 15:33
Laravel Queue Supervisor configuration

How to use Supervisor:A Process Control System for Laravel queue In Linux based OS

What is Supervisor: A Process Control System?

Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. Supervisor provides you with one place to start, stop, and monitor your processes. Processes can be controlled individually or in groups. You can configure Supervisor to provide a local or remote command line and web interface.


Why do we use Supervisor for Larave Queue?

The supervisor is a process manager which Laravel suggests to use as a process monitor for queue workers. It will automatically start the queue worker in the background, even after the system has booted and will automatically restart the worker if the worker exits unexpectedly.

@berkocan
berkocan / Hava Durumu (Api) Json Kodu.php
Last active November 28, 2021 21:23
Hava Durumu (Api) Json Kodu | Hava Durumu Api
Hava durumunu json ile api olarak sitenize eklemek için aşağıdaki kodları kullanabilirsiniz. ▼☟↓
<?php
$JSON = json_decode(file_get_contents('https://api.genelpara.com/embed/hava-durumu.json'), true);
?>
<ul>
<li>
<span>İstanbul</span>
<span>Hava: <?php echo $JSON['istanbul']['hava']; ?></span>
<span>Sıcaklık: <?php echo $JSON['istanbul']['sicaklik']; ?></span>
@berkocan
berkocan / Namaz Vakitleri (Api) Json Kodu.php
Last active November 28, 2021 21:23
Namaz Vakitleri (Api) Json Kodu
Namaz vakitlerini json ile api olarak sitenize eklemek için aşağıdaki kodları kullanabilirsiniz. ▼☟↓
<?php
$JSON = json_decode(file_get_contents('https://api.genelpara.com/embed/namaz-vakit.json'), true);
?>
<ul>
<li>
<span>İstanbul</span>
<span>İmsak: <?php echo $JSON['istanbul']['imsak']; ?></span>
<span>Güneş: <?php echo $JSON['istanbul']['gunes']; ?></span>
@MACscr
MACscr / FilamentTableTabs.php
Last active March 26, 2025 21:31
Standalone Filament Table Tabs
<?php
# App\Http\Livewire\Traits\FilamentTableTabs
namespace App\Http\Livewire\Traits;
trait FilamentTableTabs
{
public ?string $activeTab = null;
<?php
namespace Database\Seeders;
use App\Models\Country;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class CountrySeeder extends Seeder