Skip to content

Instantly share code, notes, and snippets.

View akrez's full-sized avatar
😋
Work Partially

Ali aKbar REZaei akrez

😋
Work Partially
View GitHub Profile
@rezakhademix
rezakhademix / docker-php-ext.md
Last active January 13, 2025 05:11
List of php docker extension with some guides to use them

List of PHP docker extensions:

RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
@meysampg
meysampg / dd.php
Created July 8, 2017 03:10
define `dd` function for Yii2
<?php
// add anywhere after `require(__DIR__ . '/../vendor/autoload.php');` on index.php file
function dd($v) {
\yii\helpers\VarDumper::dump($v, 10, true);
exit();
}
@MicrowaveDev
MicrowaveDev / ImageToInstagramController.php
Last active January 6, 2023 19:09
Laravel Intervention Image place to square for instagram(fill background, vertical or horizontal align a image) plus blur option.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class AdminController extends Controller
{
public function imageFillToSquare(Request $request){
@jeanlescure
jeanlescure / README.md
Last active November 13, 2025 16:58
Ubuntu/Debian Offline Repository Creation

Ubuntu/Debian Offline Repository Creation Gist

When I googled how to create my own offline repository of packages for use in an offline Ubuntu/Debian machine, the results were disheartening and the steps to be taken scattered all over the place.

The files within this gist will allow you to:

  • Download specific apt-get packages... with dependencies included!
  • Create a Packages.gz file so that you can add the repository folder you create to the target machine's /etc/apt/sources.list file.

Before using

@boenrobot
boenrobot / EchoClient.php
Created January 18, 2015 14:55
EchoService
<?php
ini_set('memory_limit', -1);
//sleep(20);
$protocol = isset($argv[3]) ? $argv[3] : 'tcp';
$conn = stream_socket_client(
"{$protocol}://[{$argv[1]}]:{$argv[2]}/",
$errno,
$errstr,
10,
STREAM_CLIENT_CONNECT,
@cboden
cboden / certificate.pem
Created August 19, 2012 16:03
No Async SSL w/ PHP
-----BEGIN CERTIFICATE-----
MIIEFzCCAv+gAwIBAgIBADANBgkqhkiG9w0BAQQFADBqMQswCQYDVQQGEwJkZTEP
MA0GA1UECBMGSGVzc2VuMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBM
dGQxEzARBgNVBAcTCkRpbGxlbmJ1cmcxEjAQBgNVBAMTCTEyNy4wLjAuMTAeFw0x
MjA2MTYyMDE2MDhaFw0yMjA2MTQyMDE2MDhaMGoxCzAJBgNVBAYTAmRlMQ8wDQYD
VQQIEwZIZXNzZW4xITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDET
MBEGA1UEBxMKRGlsbGVuYnVyZzESMBAGA1UEAxMJMTI3LjAuMC4xMIIBIjANBgkq
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAofA7J9eN5Q8pTrbHOBQC63gB4m6NPNjx
NZ302U5VK5SIkT8lYNk/uwY88C93jAgEBjgSk9IcLdzCRIay5UJmf92fSwZS+x+7
V8nQyuMtQ+9uipX5nhFVAj1iGbO92McsuBb9ck1jQuNt5YZW1WsnGivh88vMiKBa