Skip to content

Instantly share code, notes, and snippets.

kurozumi kurozumi

Block or report user

Report or block kurozumi

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
@kurozumi
kurozumi / main.yml
Last active Feb 10, 2020
CI/CD for EC-CUBE4 PLUGIN
View main.yml
name: CI/CD for EC-CUBE4 PLUGIN
on: push
env:
PLUGIN_CODE: EmailEntry4
ECCUBE_BRANCH: '4.0'
jobs:
mysql:
name: MySQL
runs-on: ubuntu-latest
strategy:
View gist:9717a5dddf46650aeb9de5fafd3457a2
<?php
/*
* Copyright (C) 2019 Akira Kurozumi <info@a-zumi.net>.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
View image_add.js
{% block javascripts %}
<script src="//blueimp.github.io/jQuery-File-Upload/js/vendor/jquery.ui.widget.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.iframe-transport.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload.js"></script>
<script src="//blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload-process.js"></script>
<script src="//blueimp.github.io/jQuery-File-Upload/js/jquery.fileupload-image.js"></script>
<script type="text/javascript">
$('#{{ form.image.vars.id}}').fileupload({
url: "{{ url("image_add") }}",
View gist:6ba276b05b0ea2653d5692b251b5e723
<?php
namespace App\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
View ImageController.php
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
@kurozumi
kurozumi / FileUploader.php
Created Feb 25, 2019
FileUploader Service
View FileUploader.php
<?php
namespace App\Service;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* Description of FileUploader
*
@kurozumi
kurozumi / thumbnails.php
Last active Dec 27, 2018
【WordPress】画像サイズを登録する
View thumbnails.php
<?php
/*
* アイキャッチ画像を有効化
*/
add_theme_support('post-thumbnails');
/*
* 画像サイズ登録
* [width, height, [true|false|array]]
@kurozumi
kurozumi / LineAuthenticator.php
Created Dec 17, 2018
SymfonyでLineログイン
View LineAuthenticator.php
<?php
namespace App\Security;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
@kurozumi
kurozumi / wp-media.php
Created Oct 30, 2018
WP REST API v2で画像投稿
View wp-media.php
<?php
require_once( dirname( __FILE__ ) . '/wp-load.php' );
// APIエンドポイントのURL
$url = 'http://sample.com/wp-json/wp/v2/media';
// ユーザー名(Application Passwordsプラグインでパスワードを発行したユーザーのもの)
$username = 'test';
// パスワード(Application Passwordsプラグインで発行されたパスワード)
@kurozumi
kurozumi / api-post.php
Last active Oct 30, 2018
WP REST API v2で新規投稿
View api-post.php
<?php
require_once( dirname( __FILE__ ) . '/wp-load.php' );
// APIエンドポイントのURL
$url = 'http://sample.com/wp-json/wp/v2/posts';
// ユーザー名(Application Passwordsプラグインでパスワードを発行したユーザーのもの)
$username = 'test';
// パスワード(Application Passwordsプラグインで発行されたパスワード)
You can’t perform that action at this time.