Skip to content

Instantly share code, notes, and snippets.

@culy247
culy247 / read_csv.php
Created January 28, 2021 22:06 — forked from selwynpolit/read_csv.php
Php code to read a csv file of any size without exhausting memory and let you process it in chunks
/*
Reads a CSV file in chunks of 10 lines at a time
and returns them in an array of objects for processing.
Assumes the first line of the CSV file has headings
that will be used as the object name for the item you are
processing. i.e. the heading is CurrentURL then refer to
$item->CurrentURL
@culy247
culy247 / Git-Pre-commit-setup.md
Created August 27, 2020 03:07 — forked from sdavara/Git-Pre-commit-setup.md
Git-pre-commit-hooks for PHP/Laravel Project

Pre Commit Setup

Setup pre-commit hook in php projects for lint, code standard, test cases etc.

Prerequisites

  • php >= 5.6
  • composer
  • git

Installation

@culy247
culy247 / command.txt
Created August 14, 2020 01:08 — forked from fbn4sc/command.txt
Delete all branches except master and develop.
git branch | grep -v "master\|develop" | xargs git branch -D
@culy247
culy247 / .php_cs.laravel.php
Created June 24, 2020 06:45 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null]