Skip to content

Instantly share code, notes, and snippets.

View ostark's full-sized avatar

Oliver Stark ostark

  • Berlin area, countryside
View GitHub Profile
@lorisleiva
lorisleiva / toSqlWithBindings.php
Last active November 15, 2023 08:54
A little macro to get the SQL from a query builder without the annoying "?".
<?php
use Illuminate\Database\Eloquent\Builder;
Builder::macro('toSqlWithBindings', function () {
$bindings = array_map(
fn ($value) => is_numeric($value) ? $value : "'{$value}'",
$this->getBindings()
);
{
"registrar": [
{
"provider": "class",
"language": "php",
"signatures": [
{
"class": "FooClass",
"method": "foo",
"type": "type"

Download DrupalConsole

curl https://drupalconsole.com/installer -L -o drupal.phar

Make DrupalConsole globaly accesible

$ mv console.phar /usr/local/bin/drupal
@jmolivas
jmolivas / symfony-drupal.md
Last active November 28, 2018 04:40
Drupal related tools based on modern PHP development and Symfony components
@tracker1
tracker1 / 01-directory-structure.md
Last active May 4, 2024 19:55
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@SchumacherFM
SchumacherFM / Magento-HHVM.md
Last active May 17, 2018 18:26
Running Magento Enterprise Edition with Facebook HipHop HHVM

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

Hardware

MacBook Air (MBA) Mid 2012