Skip to content

Instantly share code, notes, and snippets.

View king-panda's full-sized avatar

たかだようすけ king-panda

View GitHub Profile
@king-panda
king-panda / file0.txt
Last active June 17, 2020 12:09
【Firebase】Cloud Functions + Express + EJSで動的コンテンツを配信する ref: http://qiita.com/kingpanda/items/aa9bdef2706857720058
├── firebase.json
├── functions
│   ├── firebase-debug.log
│   ├── index.js
│   ├── node_modules
│   │   ├── @types
│   │   ├── ・・・・・・・
│     │     ├── ・・・・・・・
│   ├── package-lock.json
│   ├── package.json
@king-panda
king-panda / file0.html
Last active May 19, 2019 07:53
【AMP】amp-listで取得したデータをamp-bindを使ってリアルタイムにフィルタリングする ref: https://qiita.com/kingpanda/items/d086aa5cdb4a8dae43be
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
@king-panda
king-panda / file0.html
Last active June 8, 2019 09:22
【AMP】amp-listでWP REST APIを使って記事リストを取得する ref: https://qiita.com/kingpanda/items/b78fc9699067c5506ff7
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
@king-panda
king-panda / js
Last active January 1, 2016 11:27
【JS】360°パノラマ写真からCanvasを使って惑星「リトルプラネット」を作る ref: http://qiita.com/kingpanda/items/13f7bc06bdb95d3c0bc0
var WIDTH = 500;
var HEIGHT = 500;
var img = new Image();
img.src = "test.jpg";
var rotDig = 0;
window.onload = function (){
@king-panda
king-panda / GAS
Last active October 30, 2016 11:03
【GAS】スプレッドシートのデータをJSON出力する関数をExecution APIで外部のNode.jsから実行する ref: http://qiita.com/kingpanda/items/8e60a64dc2454f6ae6b5
var url = 'https://docs.google.com/spreadsheets/d/***スプレッドシートID***/pubhtml';
var sheetName = '***シート名***';
var book = SpreadsheetApp.openByUrl(url);
var sheet = book.getSheetByName(sheetName);
function doOutput(e){
var json = convSheet(sheet);
Logger.log(JSON.stringify(json));
return JSON.stringify(json);
@king-panda
king-panda / data.json
Last active August 29, 2015 14:23
【Node.js】スプレッドシートからJSONファイルを生成するコマンドラインツール ref: http://qiita.com/kingpanda/items/aa52ab5368220ef0786f
[
{
"id": 1,
"page": "トップページ",
"url": "/index.html",
"title": "ゴルゴ13|トップページ",
"discription": "超一流のスナイパー(狙撃手)「ゴルゴ13」ことデューク東郷の活躍を描く",
"template": "A"
},
@king-panda
king-panda / file0.js
Last active August 29, 2015 14:22
【GAS】Backlogの残タスク(課題チケット)をGASで取得してチャットワークに流す ref: http://qiita.com/kingpanda/items/44667f2ddc39e760ea8b
function task() {
// スプレットシート取得
var mySS = SpreadsheetApp.openById("***スプレットシートのID***");
// スプレットシートの書き込む位置
var range= mySS.getSheetByName("**シートの名前**").getRange(1, 1);
// BacklogプロジェクトのID
var pjid = **PJ ID**;
@king-panda
king-panda / bill.coffee
Last active August 29, 2015 14:21
【Hubot】AWSの利用料金を聞くと答えてくれるようにした ref: http://qiita.com/kingpanda/items/aa1b24ffd12dd81f1ab2
execsyncs = require('execsyncs')
module.exports = (robot) ->
robot.respond /aws_bill/i, (msg) ->
result = '' + execsyncs('sh 「bill.sh」のパス')
obj = JSON.parse(result)
bill = '・・・$'+obj["Maximum"]
@king-panda
king-panda / file0.txt
Created May 24, 2015 13:36
【Sass】フィボナッチ数列の第n項を求めるカスタム関数 ref: http://qiita.com/kingpanda/items/8e6a4a382e13d1feafd2
@function 自作関数名($引数){
@return 戻り値;
}
@king-panda
king-panda / css
Last active August 29, 2015 14:21
【Sass】配列を@each文でリストとして出力 ref: http://qiita.com/kingpanda/items/f63a536ab76ba9f2f507
ul li:nth-child(1):before {content: "Curtis Wilbur";}
ul li:nth-child(2):before {content: "John S McCain";}
ul li:nth-child(3):before {content: "Fitzgerald";}
ul li:nth-child(4):before {content: "Lassen";}
ul li:nth-child(5):before {content: "McCampbell";}
ul li:nth-child(6):before {content: "Mustin";}