Skip to content

Instantly share code, notes, and snippets.

Avatar

Hirokazu Takatama takatama

View GitHub Profile
@takatama
takatama / index.js
Created May 3, 2018
dialogflow-fulfillment-nodejs v2.0.0 code template
View index.js
'use strict';
const functions = require('firebase-functions');
const { dialogflow } = require('actions-on-google');
const app = dialogflow();
app.intent('Default Welcome Intent', conv => {
conv.close('hello');
});
View swear-words.json
[
"arse",
"arsehole",
"ass",
"asshole",
"balls",
"bastard",
"beaver",
"beef curtains",
"bellend",
@takatama
takatama / vireplace.txt
Created Jun 18, 2020
Linux標準教科書 v3.0.2 第6章 vi エディタ 学習用データ
View vireplace.txt
lemon orange banana melon lemon
orange banana melon lemon orange
banana melon lemon orange banana
melon lemon orange banana melon
lemon orange banana melon lemon
orange banana melon lemon orange
banana melon lemon orange banana
melon lemon orange banana melon
View aozora-bunko-2020-03.json
{
"year": "2020",
"month": "03",
"ranking": [
{
"book_id": "773",
"access": 5113,
"title": "こころ",
"authors": [
"夏目 漱石"
View ssml.xml
<speak>
むかしむかし、あるところにおじいさんとおばあさんとアレクサがいました。
<prosody pitch="x-low" rate="x-slow">おじいさん、アレクサのおかげで、毎日がたのしいですねぇ。</prosody>
では問題です。私は何歳でしょうか?
<prosody pitch="x-low" rate="x-slow"><voice name="Takumi">うーん、何歳だったかのう</voice></prosody>
<audio src='soundbank://soundlibrary/impacts/amzn_sfx_fireworks_whistles_01'/>
<prosody pitch="x-high">ボーッと生きてんじゃねーよ!</prosody>
<prosody pitch="x-high"><voice name="Kendra"><lang xml:lang="en-US">I am 4 years old!</lang></voice></prosody>
<audio src='soundbank://soundlibrary/human/amzn_sfx_crowd_excited_cheer_01'/>
</speak>
@takatama
takatama / README
Created Mar 22, 2013
instagramのサムネイルとツイートを地図上に表示 - Google Maps JavaScript API v3
View README
http://instagram.com/developer/embedding/
を参考にしてサムネイルを表示する。
@takatama
takatama / Maps2Calendar.md
Last active Mar 6, 2017
A bookmarklet for adding a Google maps transit search result into Google Calendar.
View Maps2Calendar.md
@takatama
takatama / manifest.json
Last active Jan 1, 2016
Webページ上でスクリプトを実行するための Chrome 拡張機能
View manifest.json
{
"manifest_version": 2,
"name": "Name of this extension",
"version": "0.1", // 新しい拡張を公開するたびに上げていく
"description": "Description of this extension",
"icons": {
"128": "icon128.png" // chrome://extensions に表示されるアイコン。128x128
},
"page_action": {
"default_icon": "icon128.png", // アドレスバーに表示されるアイコン。19x19, 38x38 を準備しておくべき?
@takatama
takatama / background.js
Last active Jan 1, 2016
A template for page action extension.
View background.js
var urlRegExp = new RegExp('^https?://www.google.com/maps/preview'); // アドレスバーの横にアイコンを表示するときのURL正規表現
function showIcon(tabId, changeInfo, tab) {
if (tab.url.match(urlRegExp)) {
chrome.pageAction.show(tabId);
}
}
chrome.tabs.onUpdated.addListener(showIcon);
@takatama
takatama / ga-cohort.js
Last active Dec 15, 2015
Cohort Anarisis in Google Analytics
View ga-cohort.js
try {
var f = function (d) {
return d.getFullYear() + ("0" + (d.getMonth() + 1)).slice(-2) + ("0" + d.getDate()).slice(-2);
};
var c = document.cookie;
var i = c.indexOf('__utma');
var s = null;
if (i < 0) {
s = f(new Date());
} else {