Skip to content

Instantly share code, notes, and snippets.

<?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');
$(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(
@comeonly
comeonly / html5_start_template.html
Last active June 5, 2017 07:25
html5 with bootstrap2 template
<!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 -->
<?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;
set nocompatible
syntax enable
set number
set nocompatible
syntax enable
set number
set ruler
set list
@comeonly
comeonly / ts2mp4.sh
Created January 27, 2014 02:47
convert TS file to MPEG4
#!/bin/bash
#
# Convert TS file to mpeg4 file by ffmpeg.
#
# $1 = TS file
# $2 = mpeg4 file name
#
if test $# -ne 2; then
@comeonly
comeonly / .vimrc
Last active December 15, 2015 07:49
" 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>
@comeonly
comeonly / yahoo_browser.php
Created July 2, 2012 09:06
Class of login your yahoo.co.jp pages
<?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.