Skip to content

Instantly share code, notes, and snippets.

View dazz's full-sized avatar

Anne-Julia Seitz dazz

View GitHub Profile
@llupa
llupa / readme.md
Last active September 13, 2023 13:38
Team agreement on test categorisation

Introduction

I am writting this gist for two reasons:

  • I promised I will write it. Hey Dazz 👋
  • It seems that more than 1 (one) person has found this an interesting approach

A small preface: This was applied in an API project built with Symfony (API Platform). That is, there was no front-end, or HTML responses. This API project supports only json or json-ld. Our tests used the Symfony test-pack (PHPUnit and some Symfony helper classes).

@rohankhudedev
rohankhudedev / opcache.ini
Last active November 10, 2024 15:24
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@prog
prog / .gitlab-ci.yml
Created December 14, 2017 07:30
How to use composer (php) including cache with gitlab-ci
build:install-vendor:
stage: build
image: <any-image-with-composer>
before_script:
- composer config -g cache-dir "$(pwd)/.composer-cache"
script:
- composer install --ignore-platform-reqs --no-dev --optimize-autoloader --no-ansi --no-interaction --no-progress
cache:
paths:
- .composer-cache/
@chadrien
chadrien / README.md
Last active October 31, 2024 12:27
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@mpak2
mpak2 / fft.php
Created February 1, 2014 21:49 — forked from mbijon/fft.php
<?php
// !!! Warning: for reference, not debugged
###################################################################
# PHP_Fourier 0.03
# Original Fortran source by Numerical Recipies
# PHP port by Mathew Binkley ([email protected])
###################################################################
@pascalpoitras
pascalpoitras / config.md
Last active October 7, 2024 01:35
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
<?php
// not so great:
if ($blah) {
$doSomething;
} else {
throw Exception();
}
// better:
// be explict
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@Ocramius
Ocramius / User.php
Last active July 24, 2024 14:38
Doctrine 2 ManyToMany - the correct way
<?php
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity()
* @ORM\Table(name="user")
*/
class User