Skip to content

Instantly share code, notes, and snippets.

View daipresents's full-sized avatar

Dai Fujihara daipresents

View GitHub Profile
>gem list locale
*** LOCAL GEMS ***
locale (2.0.5)
locale_rails (2.0.5, 2.0.4)
@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)
@daipresents
daipresents / gist:83f48620b719c515cd340e4f9c2c40d8
Last active May 16, 2016 05:45
Pukiwikiでソースコードをハイライトするプラグインを作ろうかと
define(HIGHLIGHT_DIR, SKIN_DIR . 'dp.SyntaxHighlighter/Scripts/');
@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: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>
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:d5038a00a4713171a915c0f9a6f6b443
Created May 11, 2016 07:33
開発時のAgileなデータベース管理とは?
ALTER TABLE ...;
DROP TABLE ...;
-- other DDL changes
INSERT INTO CHANGELOG (16, '0016_customer_info.sql', GETDATE(), USER);
@daipresents
daipresents / gist:3b6351f899164b4111590068c52e4197
Created May 11, 2016 07:29
WordPressで簡単にイベントトラッキングできるプラグイン「WP Google Analytics Events」
onclick="ga('send', 'event', 'amazon item link', 'click', 'image');"
@daipresents
daipresents / gist:ad3d5336b3e1a552f75cf8d515fe876e
Created May 11, 2016 07:27
Google Analyticsで計測し学習を経て、WordPressを育てる7つのコンパス
<script type="text/javascript">// <![CDATA[
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-4256542-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
// ]]></script>
@daipresents
daipresents / gist:46d852be95712cf81fc5015463194a2c
Created May 11, 2016 07:24
直感的に受け入れテスト仕様書を記述できるConcordionを試してみた
package com.example;
public class Greeter {
public String greetingFor(String firstName) {
return String.format("Hello %s!", firstName);
}
}