Skip to content

Instantly share code, notes, and snippets.

View ounziw's full-sized avatar

Fumito Mizuno ounziw

View GitHub Profile
<?php
/*
Plugin Name: Show Warning Message on Dashboard
Plugin URI: http://www.rescuework.jp/
Description: Displays warning messages on your WP's dashboard.
Author: Fumito MIZUNO
Version: 1.0
License: GPL 2.0 or later http://www.gnu.org/licenses/gpl.html
*/
<?php
/**
* Copyright (c) 2014 Fumito MIZUNO
* License: MIT
* http://opensource.org/licenses/mit-license.php
*/
class Cart {
protected $capabilitylist;
protected $queuelist;
<?php
/**
* Copyright (c) 2014 Fumito MIZUNO
* License: MIT
* http://opensource.org/licenses/mit-license.php
*/
require_once('yoyakulist.php');
class Main
@ounziw
ounziw / check_route.php
Last active August 29, 2015 14:09
nagoya php 第7回のどうかく?問題。 ルートを記述しておく、という方法(プログラムはほとんど関係ない方法)
function check_route($input) {
$data = array(
'14' => array('abc', 'gc', 'gh'),
'15' => array('ab', 'ge'),
'16' => array('abc', 'gc', 'ghi'),
'24' => array('dc', 'h'),
'25' => array('de'),
'26' => array('dc', 'hi'),
'34' => array('bc', 'fgc', 'fgh'),
@ounziw
ounziw / route.php
Created November 17, 2014 08:31
nagoya php 第7回のどうかく?問題。次のルートへのデータを、再帰的に処理する
<?php
$routes = array(
1 => array('a','g'),
2 => array('d','h'),
3 => array('b','f'),
'a' => array('b'),
'b' => array('c',5),
'c' => array(4,6),
'd' => array('c','e'),
@ounziw
ounziw / sheet.php
Created January 30, 2016 07:24
nagoyaphp第10回 (2016年1月30日) の課題
<?php
/**
* 問題の説明は
* http://nabetani.sakura.ne.jp/hena/ord7selectchair/
*
* 座席:両端に、仮想上の席を用意する
*
* 座席に点数をつける
* 両隣空き : 0
* 方側空き : 1
<?php
$woman_1 = new Woman(0,1);
$woman_1->bear(2);
$woman_1->bear(3);
$woman_1->bear(4);
$woman_2->bear(5);
$woman_2->bear(6);
$woman_2->bear(7);
<?php
/*
******************************
concrete5 ログインユーザーの属性を Mautic のトラッキングコードに引き渡すサンプル
******************************
concrete5 テーマファイルに実装していただく想定です。
concrete5 側のユーザー属性サンプル
メールアドレスは concrete5 のデフォルトのメールアドレスを取得する
last_name: 姓
first_name: 名
@ounziw
ounziw / view.css
Last active April 28, 2017 02:12
timeline view for concrete5 page_list block (concrete5のページリストの表示を年表のようにするコード)
.timeline {
list-style: none;
}
.timeline > li {
margin-bottom: 20px;
position: relative;
}
@media ( max-width : 639px ){
@ounziw
ounziw / controller.php
Last active November 21, 2017 05:59
drag & drop image upload for concrete5.7.5.x. put this file into application/attributes/image_file/
<?php
// LICENSE: MIT
// by Fumito MIZUNO
// forked from controller/attribute/image_file/controller.php
namespace Application\Attribute\ImageFile;
use Core;
use Database;