This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<$MTSetVar name="nest_count" value="0"$><MTParentCategories><$MTSetVar name="nest_count" op="++"$></MTParentCategories><MTIf name="nest_count" gt="2">service/list_<$MTCategoryBasename$>.html<MTElse>_index.html</MTElse></MTIf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright (c) Tomohiro Okuwaki. http://www.tinybeans.net/blog/ | |
use strict; | |
use warnings; | |
use utf8; | |
# 複数のファイルの操作 | |
my $dir = shift; | |
my $files = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MTDDC</title> | |
<style type="text/css"> | |
#result-container { | |
position: relative; | |
} | |
#result-img { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:EntryJSONTableItems> | |
<mt:IfEntryJSONTableItem key=“foo"> | |
<mt:EntryJSONTableItem key=“foo”> | |
</mt:IfEntryJSONTableItem> | |
<mt:Else> | |
do something when items is empty | |
</mt:EntryJSONTableItems> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// --------------------------------------------------------------------- | |
// $.MTAppTemplateSelectorWidget(); | |
// --------------------------------------------------------------------- | |
// Latest update: 2016/06/24 | |
// | |
// テンプレートの編集画面に、テンプレート一覧のドロップダウンリストウィジェットを追加し、 | |
// 選択したテンプレートの編集画面にジャンプします。 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// 元記事:http://bit-part.net/blog/2015/01/mtapplisting.html | |
$('#customfield_bpentrylist').MTAppListing({ | |
url: '<mt:Var name="config.CGIPath"><mt:Var name="config.DataAPIScript">/v1/sites/<mt:BlogID>/entries', | |
data: { | |
limit: 9999999, | |
// categories を追加します | |
fields: 'id,title,categories' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// MTAppjQuery v1.9.0 以前のバージョンの場合は下記が必要 | |
$.extend({ | |
objectSort: function(array, key, order, type) { | |
order = (order === 'ascend') ? -1 : 1; | |
array.sort(function(obj1, obj2){ | |
var v1 = obj1[key]; | |
var v2 = obj2[key]; | |
if (type === 'numeric') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
// --------------------------------------------------------------------- | |
// $(foo).MTAppAssetFields(); | |
// --------------------------------------------------------------------- | |
// Latest update: 2016/07/01 | |
// | |
// input:text で MT 標準の「アイテム」ダイアログを利用できるようにします。 | |
// id, filename, url, thumnail(imageのみ)の値を JSON で保存します。 | |
// --------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================================================== | |
# MTML Completions for ATOM [start] | |
# ================================================== | |
'.text.md, .text.plain, .text.html.basic, .text.html.php, .source.js, .source.css, .source.yaml': | |
'current_mapping="1"': | |
'prefix': 'current_mapping="1"' | |
'body': 'current_mapping=\"${1:1}\"' | |
'with_index="1"': |