Skip to content

Instantly share code, notes, and snippets.

jehaby /
Last active June 5, 2023 07:53 — forked from chadrien/
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 \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name" > /usr/local/etc/php/conf.d/xdebug.ini \
mypacecreator / functions.php
Last active March 1, 2017 08:46
WordPress ログイン時にダッシュボードではなくサイトトップへ飛ばす
View functions.php
function redirect_login_front_page() {
if( !current_user_can('administrator') ){
$home_url = site_url('', 'http');
naosim /
Last active November 29, 2023 07:50


以下、ブランチ名を hoge から foo に変更する例

  • ローカルのブランチ名変更
git branch -m hoge foo
  • リモートのブランチを消す
isimmons / gist:8202227
Last active November 18, 2022 00:39
Truncate tables with foreign key constraints in a Laravel seed file.
View gist:8202227

For the scenario, imagine posts has a foreign key user_id referencing

public function up()
	Schema::create('posts', function(Blueprint $table) {