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 | |
/** | |
* Class login and scraping your yahoo.co.jp pages | |
* | |
* PHP version 5 | |
* | |
* LICENSE: | |
* | |
* Copyright (c) 2012, Atunori Kamori <atunori.kamori@gmail.com> | |
* All rights reserved. |
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
" replace | |
" For function argument with comment header | |
nnoremap <leader>ra viwy?^[\ta-z ]*\<function\><CR>/{<CR>%v%V[/:s/\V<C-r>"//gc<left><left><left> | |
" For variable in function | |
nnoremap <leader>rf viwy?^[\ta-z ]*\<function\><CR>/{<CR>%v%V:s/\V<C-r>"//gc<left><left><left> | |
" For local replace | |
nnoremap <leader>rl gd[{V%:s/<C-R>///gc<left><left><left> | |
" For global replace | |
nnoremap <leader>rg gD:%s/<C-R>///gc<left><left><left> |
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 | |
# | |
# Convert TS file to mpeg4 file by ffmpeg. | |
# | |
# $1 = TS file | |
# $2 = mpeg4 file name | |
# | |
if test $# -ne 2; then |
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
set nocompatible | |
syntax enable | |
set number | |
set nocompatible | |
syntax enable | |
set number | |
set ruler | |
set list |
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 | |
error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED); | |
require_once ('./yahoo_browser.php'); | |
$yahooBrowser = new YahooBrowser('your_account', 'your_passwd'); | |
$yahooBrowser->getBody('http://auctions.yahoo.co.jp/'); | |
echo $yahooBrowser->body; |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content="****************"> | |
<title>****************</title> | |
<!-- OGP --> |
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
$(document).ready(function(){ | |
$("#contactForm").on("submit", function(event){ | |
event.preventDefault(); | |
var e = this; | |
$.post( | |
"contact.php", $(e).serialize() | |
).done(function(data){ | |
$(e).html(data); | |
}).fail(function(data){ | |
$("#contactForm").prepend( |
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 | |
ini_set('memory_limit', '-1'); | |
mb_language('ja'); | |
mb_internal_encoding('UTF-8'); | |
mb_detect_order('ASCII, ISO-2022-JP, UTF-8, eucJP-win, SJIS-win'); |