Skip to content

Instantly share code, notes, and snippets.

kouseiikeda ikekou

Block or report user

Report or block ikekou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ikekou
ikekou / CDN
Created Apr 14, 2015
[JavaScript][CoffeeScript] stats.js貼り付け用
View CDN
https://cdnjs.cloudflare.com/ajax/libs/stats.js/r11/Stats.min.js
@ikekou
ikekou / header.php
Last active Sep 20, 2018
[WordPress] OGP
View header.php
<!-- ここからOGP -->
<meta property="og:type" content="blog">
<?php
if (is_single()){//単一記事ページの場合
if(have_posts()): while(have_posts()): the_post();
echo '<meta property="og:description" content="'.get_post_meta($post->ID, _aioseop_description, true).'">';echo "\n";//抜粋を表示
endwhile; endif;
echo '<meta property="og:title" content="'; the_title(); echo '">';echo "\n";//単一記事タイトルを表示
echo '<meta property="og:url" content="'; the_permalink(); echo '">';echo "\n";//単一記事URLを表示
} else {//単一記事ページページ以外の場合(アーカイブページやホームなど)
@ikekou
ikekou / sample.css
Created Mar 28, 2015
[css] 游書体の指定をするCSS
View sample.css
/* 游ゴシック体 */
.sans-serif {
font-family: "游ゴシック体", "Yu Gothic", YuGothic, sans-serif;
}
/* 游明朝体 */
.serif {
font-family: "游明朝体", "Yu Mincho", YuMincho, serif;
}
@ikekou
ikekou / sample.js
Last active Aug 29, 2015
[javascript] requestAnimationFrameのベンダプリフィクス対応のスニペット
View sample.js
(function (w, r) {
w['r'+r] = w['r'+r] || w['webkitR'+r] || w['mozR'+r] || w['msR'+r] || w['oR'+r] || function(c){ w.setTimeout(c, 1000 / 60); };
})(window, 'equestAnimationFrame');
@ikekou
ikekou / index.html
Created Mar 24, 2015
[javascript] jQueryの読み込み
View index.html
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script> (window.jQuery || document .write('<script src="js/jquery-1.11.2.min.js"><\/script>')); </script>
@ikekou
ikekou / main.js
Created Aug 15, 2014
node.jsとphantomasで複数回計測していくつかの項目で平均とる
View main.js
var exec=require('child_process').exec;
var arr=[
'requests',
'httpsRequests',
'bodySize',
'contentLength',
'httpTrafficCompleted',
'timeToLastByte',
@ikekou
ikekou / main.sh
Created Aug 15, 2014
[node.js][phantomas] phantomasでURL指定して計測
View main.sh
$ phantomas --url http://google.com
@ikekou
ikekou / capture.js
Last active Aug 29, 2015
[node.js][javascript][phantomjs] phantomjsでスクリーンキャプチャ
View capture.js
var page = require('webpage').create();
var width = 1200;
var height = 768;
page.viewportSize = {
width: width,
height: height
};
page.open('http://localhost:8000/', function () {
@ikekou
ikekou / main.sh
Last active Aug 29, 2015
placehold.jpから連番画像をダウンロードする
View main.sh
$ curl -o '#1.png' http://placehold.jp/888888/ffffff/40x40.png?text=[1-100]
@ikekou
ikekou / main.py
Created Aug 12, 2014
ディレクトリにあるph_001.jpgっていうファイルを1.jpgにリネームする
View main.py
# -*- coding: utf-8 -*-
import os
import sys
import os.path
dir = './'
files = os.listdir(dir)
for file in files:
print '--'
You can’t perform that action at this time.