Skip to content

Instantly share code, notes, and snippets.

View goodjack's full-sized avatar
:octocat:
嗨~

小克 goodjack

:octocat:
嗨~
View GitHub Profile
@goodjack
goodjack / log4php-for-laravel.php
Last active August 11, 2017 09:45 — forked from technoknol/log4php-for-laravel.php
Working log4php in Laravel (5.4)
<?php
// Middleware:
// app\Http\Middleware\Log4php.php
namespace App\Http\Middleware;
use Closure;
class Log4php
{
@goodjack
goodjack / phpbrew-config.md
Created November 26, 2017 13:22 — forked from yang-wei/phpbrew-config.md
How to use switch PHP(using phpbrew) version in nginx config
php -v
PHP 5.6.3 (cli) (built: Oct 28 2015 09:47:41)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

But this only changes in CLI. You have to tweak you nginx(same for apache) to make it works. Nginx will still using the native PHP-FPM.

> ps aux | grep php-fpm
@goodjack
goodjack / .gitignore
Created April 26, 2019 03:44 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@goodjack
goodjack / Makefile
Created July 21, 2020 16:28 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@goodjack
goodjack / git-team-work-flow.md
Created November 3, 2020 15:32 — forked from fntsrlike/git-team-work-flow.md
Git 團隊工作流程風格:每當要做新專案時,都會貼這個給合作夥伴。

Team Work Flow

Git

Setting

請依照您的作業系統針對版本控制換行字元同步做設定。

Windows

@goodjack
goodjack / Retrive Json Data from Mysql.sql
Created November 9, 2020 03:37 — forked from ti-ka/Retrive Json Data from Mysql.sql
If you have saved data into a field as json, you can use mysql to retrieve each field. It may be useful in migrating database when you have decided that using JSON in a database was not a good idea.
/* APPENDIX 1-B: CLEANUP
This makes this sql query re-run able */
DROP TABLE IF EXISTS JSON_TABLE;
DROP TABLE IF EXISTS SPLIT_TABLE;
DROP VIEW IF EXISTS SPLIT_VIEW;
/* APPENDIX 1-B: Prepare TABLE
Let's say this is an example table */
@goodjack
goodjack / Makefile
Created March 22, 2021 10:18 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@goodjack
goodjack / pytest.md
Created February 27, 2024 07:50 — forked from kwmiebach/pytest.md
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help: