Skip to content

Instantly share code, notes, and snippets.

View mr-wolf-gb's full-sized avatar
🏠
Working from home

ʍᴙ.ώoŁƒ mr-wolf-gb

🏠
Working from home
View GitHub Profile
@mr-wolf-gb
mr-wolf-gb / docker_tls_ubuntu_16.04
Created July 10, 2024 11:06 — forked from veuncent/docker_tls_ubuntu_16.04
Setup TLS for Docker (Ubuntu 16.04)
- Create a CA, keys and certificates
- Source: https://docs.docker.com/engine/security/https/
# Create certs dir
mkdir ~/certs
cd ~/certs
# Ca key
openssl genrsa -aes256 -out ca-key.pem 4096
@mr-wolf-gb
mr-wolf-gb / delete.blade.php
Last active May 9, 2024 18:34
laravel blade form submit with confirmation msg
<form action="{{ route('...') }}" method="POST" onsubmit="if(!confirm('@lang('messages.delete_msg_confirmation')')){return false;}">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-sm btn-danger" data-bs-toggle="tooltip" title="حذف"><i class="fal fa-trash"></i></button>
</form>
@mr-wolf-gb
mr-wolf-gb / button.blade.php
Created March 7, 2024 11:02
some Alpine Js components for laravel
<button {{ $attributes->merge(['class' => 'btn']) }} {{ $attributes }} wire:loading.attr="disabled">
<span wire:loading.remove wire:target="{{ $attributes->get('wire:target') }}" class="{{ $attributes->get('span-text-class') }}">
{{ $slot }}
</span>
<div wire:loading wire:target="{{ $attributes->get('wire:target') }}">
<span class="{{ $attributes->get('indicator-progress-class') }}">
{{ $attributes->get('loading-text') ?? 'Veuillez patienter...' }}
<span
class="{{ $attributes->get('spinner-class') ?? 'spinner-border spinner-border-sm align-middle ms-2' }}"></span>
@mr-wolf-gb
mr-wolf-gb / Controller.php
Last active November 27, 2023 12:20
leaflet openstreetmap proxy
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Storage;
@mr-wolf-gb
mr-wolf-gb / windows_and_office_kms_setup.adoc
Created November 25, 2022 08:16 — forked from jerodg/windows_and_office_kms_setup.adoc
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@mr-wolf-gb
mr-wolf-gb / LoginByToken.php
Last active August 14, 2022 20:08
Laravel middleware to login User to Web from accessToken
<?php
namespace App\Http\Middleware;
use App\Models\User;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@mr-wolf-gb
mr-wolf-gb / How To Install VMware Tools on Debian 11|10.txt
Created June 5, 2022 09:35
How To Install VMware Tools on Debian 11|10
- sudo apt update
Method 1: Install VMware tools that come with VMware Virtualization Application on Debian
In this method, Vmware tools are installed by connecting the VMware virtual CD to the VM CD-ROM drive. This is achieved by navigating to the top menu of VMware, then go to VM>Install VMware tools, in case you already have the VMware tools installed, click on Re-Install VMware Tools
- sudo mkdir /mnt/cdrom
- sudo mount /dev/cdrom /mnt/cdrom
- sudo ls /mnt/cdrom
- cp /mnt/cdrom/VMwareTools-version.tar.gz /tmp/
- cd /tmp
@mr-wolf-gb
mr-wolf-gb / Email Server (Windows Only).md
Created November 26, 2019 10:57 — forked from raelgc/Email Server (Windows Only).md
Setup a Local Only Email Server (Windows Only)
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;
@mr-wolf-gb
mr-wolf-gb / set-custom-domain-on-localhost-with-xampp
Created March 28, 2018 19:09 — forked from sudhir600/set-custom-domain-on-localhost-with-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onward are pretty much applicable on other operating system.
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
=============
127.0.0.1 your.domain.com
=============
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf