Skip to content

Instantly share code, notes, and snippets.

View vahiiiid's full-sized avatar
👌
keep it going

vahiiiid vahiiiid

👌
keep it going
View GitHub Profile
@vahiiiid
vahiiiid / LaravelLanguageMigration.php
Last active August 13, 2021 07:09
Laravel migration and seeder for importing all available languages. including standard string of all 2 and 3 character language symbol and english standard names.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLanguagesTable extends Migration
{
/**
* Run the migrations.
@vahiiiid
vahiiiid / LaravelCountryMigration.php
Last active August 13, 2021 07:09
Laravel migration and seeder for importing all countries standard codes and names.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCountriesTable extends Migration
{
/**
* Run the migrations.
@vahiiiid
vahiiiid / LaravelTimeZoneSeeder.php
Last active August 13, 2021 07:10
Laravel migration and seeder for importing timezones. it uses timezone_identifiers_list() php standard function and including name, offset and diff_from_gtm details for each timezone.
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTimezonesTable extends Migration
{
/**
* Run the migrations.
@eXtrem0us
eXtrem0us / nginx.conf
Last active April 15, 2024 13:47
Nginx Image Filter with Caching for Upstream
########################################################################################################
# This config enables us to:
# - Resize
# - Rotate
# ...the resident images on an upstream server, with Nginx Server in our hand, On the fly!
# - Just by using arbitrary Query Parameters
# ...and
# - Cache the transformed image by address.
#
# Well, I got the Idea from https://stumbles.id.au/nginx-dynamic-image-resizing-with-caching.html
@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()