Skip to content

Instantly share code, notes, and snippets.

My notes for upgrading laragon to work with latest apache and php8.1
Update to laragon 5:
- Stop all running services in laragon
- Make sure laragon itself is properly closed
- Download the latest laragon.exe and overwrite your original laragon.exe
https://github.com/leokhoa/laragon/releases/download/5.0.0/laragon.exe
Update to latest apache
- Download the latest apache 2.4 VS16 for windows (Apache 2.4.x OpenSSL 1.1.1 VS16):
@chrismccoy
chrismccoy / gitcheats.txt
Last active January 13, 2026 20:09
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# delete all repos in an org
gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner --jq '.[].nameWithOwner' | xargs -I {} gh repo delete {} --yes
# delete all forks in an org
gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner,isFork --jq '.[] | select(.isFork) | .nameWithOwner' | xargs -I {} gh repo delete {} --yes
@irazasyed
irazasyed / How-To Install Memcache on CentOS WHM-cPanel.md
Last active November 15, 2023 14:28
How-To: Install Memcache on CentOS (WHM/cPanel)

How-To: Install Memcache on CentOS (WHM/cPanel)

Without wasting much time, Let us get started!

Follow these simple instructions:

  • Step 1: Login into your WHM panel and using easyapache enable Memcache

  • Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64

@r-sal
r-sal / PHPExcel_Basics.md
Last active May 26, 2025 08:41
PHPExcel Notes and code snippets

Basics

Creating a new PHPExcel Object.

    $this->PHPExcel = new PHPExcel();

Working with sheets

Creating a new sheet:

@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@panquetofobia
panquetofobia / shortags_fixer.php
Created March 24, 2010 19:49
PHP short open tags fixer
<?php
/**
* Short Open Tags fixer.
*
* Usage:
* $ php -d short_open_tag=On -f shortags_fixer.php path/to/file.php
* $ for i in $(find ./ -iname "*.phtml"); do php -d short_open_tag=On -f shortags_fixer.php $i > ~/fixed.txt && cat ~/fixed.txt > $i; done
*/
function fix($file)