Skip to content

Instantly share code, notes, and snippets.

Hideki Abe hideki-a

Block or report user

Report or block hideki-a

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hideki-a
hideki-a / template_tags.php
Last active May 17, 2019
PowerCMS Xのモデルのテンプレートタグを一覧にする
View template_tags.php
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>テンプレートタグ一覧</title>
<?php
$pcmsx_dir_path = '/admin';
?>
<link href="<?php echo $pcmsx_dir_path; ?>/assets/css/bootstrap.min.css" rel="stylesheet">
<style>
View zipsearch.php
<?php
$mt_dir = '/path/to/pcms/';
require_once ( $mt_dir . 'php/mt.php' );
require_once ( $mt_dir . 'addons/DynamicMTML.pack/php/dynamicmtml.php' );
$blog_id = 1;
$mt_config = $mt_dir . 'mt-config.cgi';
$app = new DynamicMTML();
$app->configure( $mt_config );
try {
@hideki-a
hideki-a / LinkEntry.pm
Last active Jun 11, 2018
記事番号から記事を表示
View LinkEntry.pm
package MT::App::LinkEntry;
use strict;
use base qw( MT::App );
use MT::Entry;
# See Also: http://www.ark-web.jp/sandbox/wiki/306.html
@MT::App::LinkEntry = qw( MT::App );
sub init {
@hideki-a
hideki-a / app.js
Last active May 2, 2017
Forked from takanashi66/vue_rest.
View app.js
'use strict';
Vue.component('search-form', {
props: {
query: String,
},
template: `
<form class="search" action="#" @submit.prevent="searchPosts">
<input type="search" :value="query"><input type="submit" value="検索">
@hideki-a
hideki-a / cocoapods.command
Last active Jan 19, 2017
ワンクリックでCocoapodsのインストールから依存ライブラリのインストールまでを行う
View cocoapods.command
#!/bin/sh
gem which cocoapods 2> /private/tmp/result_which_cocoapods
result=$(</private/tmp/result_which_cocoapods)
if echo "$result" | grep -q "Can't"; then
echo 'Cocoapods not installed.'
echo 'Install Cocoapods.'
echo '"Password"の表示が出たら、ログインのパスワードを入力してください。'
sudo gem install cocoapods
@hideki-a
hideki-a / blog.html
Last active Nov 19, 2017
ブログ記事srcset設定例
View blog.html
<!---->
<img src="/assets/20171119_pic_01.jpg" alt="写真:JIS X 8341-3:2016, WCAG 2.0, ISO/IEC 40500:2012 早見表" srcset="/assets/20171119_pic_01.jpg 720w, /assets/20171119_pic_01_1440w.jpg 1440w" sizes="(min-width: 740px) 720px, 100vw">
<!---->
<img src="/assets/20161227_pic_01.jpg" alt="24日1回目のステージの光景" srcset="/assets/20161227_pic_01.jpg 480w, /assets/20161227_pic_01_750w.jpg 750w, /assets/20161227_pic_01_960w.jpg 960w" sizes="(min-width: 500px) 480px, 100vw">
@hideki-a
hideki-a / AppDelegate.swift
Created Nov 25, 2016
Swift 2.3用のAppDelegate.swift
View AppDelegate.swift
//
// AppDelegate.swift
// [AppName]
//
// Created by [Your Name] on [201x/xx/xx].
// Copyright © 201x年 [Your Name]. All rights reserved.
//
import UIKit
@hideki-a
hideki-a / sort_ids.swift
Created Aug 4, 2016
指定した順で配列の値を並べる
View sort_ids.swift
var mtCategoryIds = [1,2,3,4,5,7,8,9]
var savedCategoriesOrder = [3,7,2,1,5,4,6]
var dispCategoryIds: [Int] = []
for categoryId in savedCategoriesOrder {
if let index = mtCategoryIds.indexOf(categoryId) {
dispCategoryIds.append(categoryId)
mtCategoryIds.removeAtIndex(index)
} else {
if let index = savedCategoriesOrder.indexOf(categoryId) {
@hideki-a
hideki-a / fiscal_year_monthly_list.mtml
Last active Jun 7, 2016
月別アーカイブへのリンクを年度毎にまとめて出力する(年度は降順・月は昇順)
View fiscal_year_monthly_list.mtml
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>年度毎に月別アーカイブへのリンクを出力</title>
</head>
<body>
<mt:ArchiveList type="Monthly">
<$mt:ArchiveTitle regex_replace="/(\d+)年\d+月/","$1" setvar="tmp__current_year"$>
@hideki-a
hideki-a / config.yaml
Last active Apr 18, 2016
ウェブページの一覧にルートからのパスを表示する。(表示オプションでフルパスを選択する。)
View config.yaml
id: DispPageFullPath
name: DispPageFullPath
version: 1.0
list_properties:
page:
fullpath:
label: 'フルパス'
html: >
sub {
You can’t perform that action at this time.