Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
wp search-replace 'http://example.com' 'http://example.jp' |
This file contains hidden or 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
wp search-replace --network 'http://example.com' 'http://example.jp' |
This file contains hidden or 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
wp search-replace --all-tables 'http://example.com' 'http://example.jp' |
This file contains hidden or 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
mysql> create table company (company_id int AUTO_INCREMENT primary key, name text, url text); | |
mysql> insert into company values (1,'a', 'http://example.com'),(2,'b','http://example.jp'),(3,'c','http://example.net'); |
This file contains hidden or 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 (php_sapi_name() != 'cli') { | |
exit('Service Unavailable'); | |
} | |
require_once 'goutte.phar'; | |
use Goutte\Client; | |
$client = new Client(); | |
// Adventarの2015年一覧ページをGET | |
$crawler = $client->request('GET', 'http://www.adventar.org/calendars?year=2015'); |
This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<title>【Adventar】2015年アドベントカレンダー登録状況</title> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
margin: auto; | |
position: relative; | |
width: 960px; |
This file contains hidden or 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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Batch extends CI_Controller { | |
public function sample() | |
{ | |
echo "done!".PHP_EOL; | |
} | |
} |
This file contains hidden or 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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Batch extends CI_Controller { | |
public function sample($first_name = 'Ichiro', $last_name = 'Suzuki') | |
{ | |
echo "Hello {$first_name} {$last_name}!".PHP_EOL; | |
echo "done!".PHP_EOL; |
This file contains hidden or 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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Batch extends CI_Controller { | |
public function sample($first_name = 'Ichiro', $last_name = 'Suzuki') | |
{ | |
if (!is_cli()) | |
{ | |
set_status_header(403); |