Skip to content

Instantly share code, notes, and snippets.

@kenjis
kenjis / codeiginter4-cors-config.md
Last active May 11, 2024 09:38
CodeIgniter 4 CORS configuration
@kenjis
kenjis / how-to-log-uri-when-exception-occurs-in-codeigniter4.md
Last active March 18, 2024 07:23
How to Log URI or etc. when Exception occurs in CodeIgniter 4

How to Log URI or etc. when Exception occurs in CodeIgniter 4

Create your custom Exception Handler

<?php

namespace App\Libraries;

use CodeIgniter\Debug\BaseExceptionHandler;
@kenjis
kenjis / gist:6140df495728569e3ce3c2be7499b3de
Created October 30, 2021 13:43
Tests before the Builder tests
Test 'CodeIgniter\API\ResponseTraitTest::testNoFormatterJSON' started
Test 'CodeIgniter\API\ResponseTraitTest::testNoFormatterJSON' ended
Test 'CodeIgniter\API\ResponseTraitTest::testNoFormatter' started
Test 'CodeIgniter\API\ResponseTraitTest::testNoFormatter' ended
Test 'CodeIgniter\API\ResponseTraitTest::testAssociativeArrayPayload' started
Test 'CodeIgniter\API\ResponseTraitTest::testAssociativeArrayPayload' ended
Test 'CodeIgniter\API\ResponseTraitTest::testArrayPayload' started
Test 'CodeIgniter\API\ResponseTraitTest::testArrayPayload' ended
Test 'CodeIgniter\API\ResponseTraitTest::testPHPtoArrayPayload' started
Test 'CodeIgniter\API\ResponseTraitTest::testPHPtoArrayPayload' ended
@kenjis
kenjis / install-git-completion.sh
Last active August 9, 2023 02:59 — forked from johngibb/install-git-completion.sh
Mac OS X - Install Git Completion
URL_COMP="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
URL_PROMPT="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh"
#PROFILE="$HOME/.profile"
PROFILE="$HOME/.bash_profile"
#PROFILE="$HOME/.bash_aliases"
echo "Downloading git-completion..."
if ! curl "$URL_COMP" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
@kenjis
kenjis / code_review_basics.md
Created August 20, 2016 09:53 — forked from taichi/code_review_basics.md
チームでコードを書き始めた後、「どうやらレビューってやつをした方が良いらしい」くらいの若手に向けた資料です。

コードレビューの基本


一番大事な事

ソースコードはプロジェクトの共同所有物である

  • 誰かだけが触れるコードを無くす
<?php
class TennisGame1 implements TennisGame
{
private $m_score1 = 0;
private $m_score2 = 0;
private $player1Name = '';
private $player2Name = '';
@kenjis
kenjis / fuel-fuel-173-180.diff
Created April 10, 2016 07:29
git diff 1.7/master 1.8/master
diff --git a/.travis.yml b/.travis.yml
index 7ea66ae..dc1f64c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ php:
- 5.3
- 5.4
- 5.5
+ - 7.0
diff -uwbrN CodeIgniter-3.0.0/.gitignore CodeIgniter-3.0.1/.gitignore
--- CodeIgniter-3.0.0/.gitignore 1970-01-01 09:00:00.000000000 +0900
+++ CodeIgniter-3.0.1/.gitignore 2015-08-07 20:31:33.000000000 +0900
@@ -0,0 +1,27 @@
+.DS_Store
+
+application/cache/*
+!application/cache/index.html
+!application/cache/.htaccess
+
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,20 @@
         { "type": "vcs", "url": "https://github.com/fuel/email" },
         { "type": "vcs", "url": "https://github.com/fuel/oil" },
         { "type": "vcs", "url": "https://github.com/fuel/orm" },
-        { "type": "vcs", "url": "https://github.com/fuel/parser" }
+        { "type": "vcs", "url": "https://github.com/fuel/parser" },
+ {