Skip to content

Instantly share code, notes, and snippets.

View daipresents's full-sized avatar

Dai Fujihara daipresents

View GitHub Profile
add_filter( 'amp_post_template_metadata', 'xyz_amp_modify_json_metadata', 10, 2 );
function xyz_amp_modify_json_metadata( $metadata, $post ) {
$metadata['@type'] = 'NewsArticle';
$metadata['publisher']['logo'] = array(
'@type' => 'ImageObject',
'url' => 'http://daipresents.com/wp-content/uploads/2016/05/header.201502.jpg',
'height' => 60,
'width' => 298,
@daipresents
daipresents / gist:6e12258c81d59a46e4ead5e97757bff6
Created May 13, 2016 08:42
WebLogic10.0でJSPのプリコンパイル
<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "web
logic810-web-jar.dtd">
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>precompile</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app>
@daipresents
daipresents / gist:6a1d148680bdead9713fd82efe44950d
Created May 16, 2016 05:44
PHP4でWeb上のRSSを簡単に読み込んでみた
<?php
include('xml.php');
$RSS_HOST = 'http://daipresents.com/rss.xml';
$xml_data = file_get_contents($RSS_HOST);
//$xml = mb_convert_encoding(file_get_contents($RSS_HOST), 'UTF-8′, 'auto');
$data = XML_unserialize($xml_data);
echo "<ul>";
foreach($data['rss']['channel']['item'] as $entry){
echo '<li><a href="' . $entry['link'] . '">' . $entry['title'] . '</a>(' . $entry['pubDate'] . ')</li>';
}
@daipresents
daipresents / gist:83f48620b719c515cd340e4f9c2c40d8
Last active May 16, 2016 05:45
Pukiwikiでソースコードをハイライトするプラグインを作ろうかと
define(HIGHLIGHT_DIR, SKIN_DIR . 'dp.SyntaxHighlighter/Scripts/');
@daipresents
daipresents / gist:4c66d8c8cef528e24ea498a413b8b9f1
Created May 16, 2016 06:42
Androidアプリ開発 – Hello Worldまでがんばる
fujihara-oos-MacBook-Air:~ daipresents$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
>gem list locale
*** LOCAL GEMS ***
locale (2.0.5)
locale_rails (2.0.5, 2.0.4)
@daipresents
daipresents / gist:bc5b98d192f2092fa785b17fc51fccf1
Created May 16, 2016 06:47
RedmineのREST APIを使ってみる
At the time of writing, the API is only available in trunk (see r3310, r3313).
@daipresents
daipresents / gist:8d80c3b6c747cf06478c806a21decbeb
Created May 16, 2016 06:53
Redmineにプラグインを入れるときに気をつけたいこと
Showing vendor/plugins/advanced_roadmap/app/views/projects/roadmap.rhtml where line #21 raised:
undefined method `rest_hours' for #<version:0x6ce9158>
@daipresents
daipresents / gist:21ab0a8ba3662dacd17edeec840ad9f0
Created May 16, 2016 06:55
RedmineプラグインでOpen Flash Chart(OFC2)を使うとIO ERROR
def index
@graph = open_flash_chart_object(600,300,"/version_burndown/graph_code")
end
# Japanese strings go here
ja:
my_label: "My label"
task_board_text_no_sprint: プロジェクトには実行中のスプリントがありません。バージョンの期限日を確認してください。