This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function u8($str) | |
{ | |
if (mb_detect_encoding($str, "UTF-8, ISO-8859-1, GBK") != "UTF-8") { | |
return iconv("gbk", "utf-8", $str); | |
} | |
return $str; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$TERM"="linux" ] ;then | |
export LANGUAGE=en_US | |
export LANG=en_US.UTF-8 | |
fi | |
export PATH="$HOME/.cargo/bin:$PATH" | |
alias uzipz="unzip -O cp936" | |
alias 'open'='xdg-open' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\common\util; | |
use Illuminate\Database\Eloquent\Collection; | |
class TreeUtil | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# bitnami开发laravel辅助shell | |
# laravel 镜像地址 | |
# https://hub.docker.com/r/bitnami/laravel | |
# | |
# docker开发流程 | |
# 1. 创建app目录 | |
# $ mkdir web-app && cd web-app | |
# 2. 拉取compose文件 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
services: | |
code-server: | |
image: codercom/code-server | |
volumes: | |
- ~/projects:/root/project | |
ports: | |
- 8443:8443 | |
command: "--allow-http --password=xxxxxx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
if (count($argv) == 1) { | |
throw new InvalidArgumentException('Missing tables'); | |
} | |
$tables = array_slice($argv, 1); | |
$db = new PDO('mysql:dbname=requisition;host=127.0.0.1;charset=utf8mb4', 'root', '123456'); | |
foreach ($tables as $table) { | |
$query = $db->query("SHOW FULL COLUMNS FROM $table"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$excluded_folders = [ | |
'TmsLogs', | |
'Public', | |
'BiFtpFile' | |
]; | |
$finder = Symfony\Component\Finder\Finder::create() | |
->in([__DIR__]) | |
->notPath('*/Runtime') | |
->exclude($excluded_folders) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Running PHP-CS-Fixer" | |
files=$(git diff --name-only) | |
if [ ${#files} -eq 0 ];then | |
echo "Any files has no changed,skip!" | |
else | |
git diff --name-only | xargs -n1 php-cs-fixer fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "工作流启动中"; | |
# 打开phpstorm | |
open /Applications/PhpStorm.app | |
# 启动homestead | |
cd ~/Homestead && /usr/local/bin/vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:vue/recommended" |
NewerOlder