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
20161004204353 | milphy777 | 1級 | 勝 | ko31 | 2級 | 負 | http://shogiwars.heroz.jp:3002/games/milphy777-ko31-20161004_204353?locale=ja | |
---|---|---|---|---|---|---|---|---|
20161005211628 | dokutero | 1級 | 勝 | ko31 | 2級 | 負 | http://shogiwars.heroz.jp:3002/games/dokutero-ko31-20161005_211628?locale=ja | |
20161006203011 | nazoomoheji | 1級 | 勝 | ko31 | 2級 | 負 | http://shogiwars.heroz.jp:3002/games/nazoomoheji-ko31-20161006_203011?locale=ja |
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
curl https://notify-api.line.me/api/notify -X POST -H 'Authorization: Bearer [MY_ACCESS_TOKEN]' -F 'message=hello' |
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
curl https://notify-api.line.me/api/notify -X POST -H 'Authorization: Bearer [MY_ACCESS_TOKEN]' -F 'message=hello' -F 'imageThumbnail=[IMAGE_URL]' -F 'imageFullsize=[IMAGE_URL]' |
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
if ( ! function_exists( 'my_send_linenotify' ) ) { | |
function my_send_linenotify( $message, $image_thumbnail = '', $image_fullsize = '' ) { | |
$url = 'https://notify-api.line.me/api/notify'; | |
$token = '[MY_ACCESS_TOKEN]'; | |
$response = wp_remote_post( $url, array( | |
'method' => 'POST', | |
'headers' => array( | |
'Authorization' => 'Bearer '.$token, | |
), | |
'body' => array( |
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
function my_wp_login( $user_login, $current_user ) { | |
$message = $user_login . 'がログインしました'; | |
my_send_linenotify( $message ); | |
} | |
add_action( 'wp_login', 'my_wp_login', 10, 2 ); |
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
function my_publish_post( $ID, $post ) { | |
$message = "新規投稿が公開されました。\n"; | |
$message .= "タイトル:" . $post->post_title . "\n"; | |
$message .= "URL:" . get_permalink( $ID ); | |
my_send_linenotify( $message ); | |
} | |
add_action( 'publish_post', 'my_publish_post', 10, 2 ); |
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
function my_wpcf7_mail_sent( $contact_form ) { | |
$message = "お問い合わせフォームが送信されました。\n"; | |
$message .= "タイトル:" . $contact_form->title; | |
my_send_linenotify( $message ); | |
} | |
add_action( 'wpcf7_mail_sent', 'my_wpcf7_mail_sent', 10, 1 ); |
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
# ncurses をインストール | |
mkdir ~/opt && cd $_ | |
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz | |
tar zxfv ncurses-6.1.tar.gz | |
cd ncurses-6.1 | |
./configure --prefix=$HOME/local | |
make | |
make install | |
# Vim をインストール |
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 | |
require_once 'vendor/autoload.php'; | |
use Goutte\Client; | |
$client = new Client(); | |
$data = array(); | |
// 棋士ページをGET |
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 | |
require_once 'vendor/autoload.php'; | |
use Goutte\Client; | |
class Scraper { | |
protected $client; | |
public function __construct() { | |
$this->client = new Client(); |