Skip to content

Instantly share code, notes, and snippets.

View OmarHossamEldin's full-sized avatar
🎯
Focusing

Omar Hossam Eldin Kandil OmarHossamEldin

🎯
Focusing
View GitHub Profile
@dipenparmar12
dipenparmar12 / phpstrom-installation.md
Last active January 8, 2024 10:13
How to install phpstrom in Linux os

How to install PhpStorm on Linux

Video Tutorial

1. PhpStorm Download Link

Extract .tar.gz Files using Linux Command Line ...

@jorgecrodrigues
jorgecrodrigues / UsersTableSeeder.php
Created December 23, 2019 17:09
Progress bar for seed, Laravel
<?php
use Illuminate\Database\Seeder;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\ConsoleOutput;
class UsersTableSeeder extends Seeder
{
/**
* Amount.
@sam-ngu
sam-ngu / CollectionHelper.php
Last active September 22, 2023 01:49
Laravel Collection Helper: paginate collection
<?php
namespace App\Helpers\General;
use Illuminate\Container\Container;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Collection;
@matthewzring
matthewzring / markdown-text-101.md
Last active May 12, 2024 07:04
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active January 20, 2024 23:35
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@nkt
nkt / Results.md
Last active September 27, 2023 08:24
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%
@james2doyle
james2doyle / simple-json-reponse.php
Last active March 7, 2024 06:02
A simple JSON response function for PHP. Used in various PhileCMS plugins.
<?php
function json_response($code = 200, $message = null)
{
// clear the old headers
header_remove();
// set the actual code
http_response_code($code);
// set the header to make sure cache is forced
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900");
var myElement = document.getElementById('IDoftheDIV');
if(window.addEventListener) {
// Normal browsers
myElement.addEventListener('DOMSubtreeModified', contentChanged, false);
} else
if(window.attachEvent) {
// IE
myElement.attachEvent('DOMSubtreeModified', contentChanged);
}