security
SQL injection
solution
Parameterized Query
PDO
use parameters query
ORM
don't use where raw
example
SQL map
XSS
solution
htmlentities()
htmlspecialchars()
example
輸入 <script>alert('hahaha')</script> 在一個 form 裡,其他使用者觀看時就會出現彈出視窗
CSRF
solution
token
Remote File Inclusion
git
config
project
.git
config
.gitignore
.gitkeep
global
etc/gitconfig
personal
~/.gitconfig
name
email
gitolite
rename repo name
command
local
checkout
path
brachname
[--theris or --ours] [path]
Inspection and Comparison
show
log
diff
Branching and Merging
stash
pop
drop
list
branch
-D
-m
tag
tag -a [tag name] -m "message"
git push origin [tagname]
Administration
gc
clean
Patching
revert
rebase
cherry-pick
Basic
reset
debug
blame
remote
match remote and origin branch
remote show origin
branch --set-upstream-to local-branch-name origin/remote-branch-name
System
tools
xshell
webserver
nginx
config
/ect/nginx
log
var/logs/nginx
php
php-fpm
php-modules
pecl
php
-i
--info
-v
--version
-f
--file
-r
--run
-m
--modules
config
php.ini
nc -vz ip port
cronjob
/etc/crontab
user
id
file
mod
owner
database
table
field
separated by _
timestamp vs datetime
option
row format
collate
utf8_general_ci
utf8_unicode_ci
data types
string
VARCAHR
TEXT
ENUM
SET
number
tinyint
int
bigint
facebook id
date
DATETIME
TIMESTAMP
DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP
IP
Unsigned Integer
INET_ATON
address to number
INET_NTOA
number to address
index
idx_xxx
storage engine
innodb
myISAM
SQL
tools
navicat
結構同步
資料同步
Stored Procedure
sp
Front-End
HTML
html5
CSS
position
Javascript
asynchronous
JQuery Best Practices
load cdn and then local
jQuery Variables
Selectors
Append
Event Handling
Ajax
Review
Y Slow
Google Page Speed
GTmetrix
SEO
clean url
Meta tags
slug
Google Web Master
Ref
http://gregfranko.com/jquery-best-practices/#/
http://lab.abhinayrathore.com/jquery-standards/
Php
Coding Style
psr
PHP CodeSniffer
API
response according HTTP status code
Benchmark
The PHP Benchmark
http://phpbench.com/
OOP
Basic
class
properties
method
trait
interface
SOLID
Design Pattern
Factory
Singleton
Strategy
Front Controller
clean url
Model-View-Controller
Magic Methods
__autoload
__get
__set
__isset
__unset
__wakeup
__sleep
__clone
clone
__toString
__invoke
__callstatic/__call
__construct
__destruct
__set_state
var_export
reflection
Reference
PHP The Right Way
PHP Best Practices
https://phpbestpractices.org/#utf-8
PHP Bridge
http://docs.phpbridge.org/intro-to-php/
Package
Composer
pear
Laravel
MVC
Model
CRUD
View
show
Controller
session
input
output
Middleware
form small to large
mvc
msvc
mrcvc
ddd
Example
Services
Log
Mail
Testing
Write Package
Package Development
Command
Queue
Task Scheduling
Event
Command Bus
View
Localization
Model
Cache
Service
Collection
Controller
Validation
Database
ORM
Collection
Test
unit test
phpunit
Integration Test
Functional Test
selenium
Stress Test
apache ab