SELECT id, name, createtime
FROM pre_tamplate AS tamplate
JOIN pre_table AS table
WHERE tamplate.id = table.id
AND table.id = 1234;
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 | |
use Mockery as m; | |
use PHPUnit\Framework\TestCase; | |
class SampleTest extends TestCase | |
{ | |
protected function setUp() | |
{ | |
parent::setUp(); |
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 | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use Goutte\Client as Goutte_Client; | |
$client = new Goutte_Client(); | |
$records_path = __DIR__ . '/../logs/records.log'; | |
$apple_url = 'https://www.apple.com'; | |
$country_code = '/tw'; | |
$specialdeals_url = '/shop/browse/home/specialdeals/mac'; |
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 | |
use Mockery as m; | |
use PHPUnit\Framework\TestCase; | |
class StaticClassTest extends TestCase | |
{ | |
protected function tearDown() | |
{ | |
m::close(); |
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 MyDB; | |
use Illuminate\Support\ServiceProvider; | |
use MyDB\Connectors\MyDBConnector as Connector; | |
class MyDBServiceProvider extends ServiceProvider | |
{ | |
/** |
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
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh | |
# Services | |
services: |
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
# Before Tests | |
before_script: | |
- bash ci/docker_setup.sh > /dev/null | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.gitlab .env | |
- php artisan key:generate | |
# Services | |
services: |
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
# Install tmux on Centos release 6.5 up | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/usr/local |
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 | |
/* ************************************************* | |
@Name: Lifetype to Wordpress | |
@description: | |
這是一個可以直接在主機上執行的轉換程式, | |
可以協助您將Lifetype中「指定的」部落格, | |
所有文章、類別、迴響、引用、我的連結, | |
轉換到Wordpress系統「指定的」部落格中。 | |
@Version: V1.10 | |
V1.10 加入可修改base網址 |
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 | |
if (function_exists("date_default_timezone_set")) { | |
date_default_timezone_set("UTC"); | |
} | |
function simple() { | |
$a = 0; | |
for ($i = 0; $i < 1000000; $i++) | |
$a++; |
NewerOlder