Skip to content

Instantly share code, notes, and snippets.

View kurozumi's full-sized avatar

kurozumi kurozumi

View GitHub Profile
@kurozumi
kurozumi / amazon-reservation.py
Created November 9, 2015 07:01
【Python】アマゾン・ホビーカテゴリの予約商品のasinと発売日を取得
# coding: utf-8
from selenium import webdriver
import re
asins=[]
driver = webdriver.PhantomJS()
for page in range(1,3):
@kurozumi
kurozumi / plg_nonmember_form.twig
Last active April 2, 2024 11:32
お届け先情報入力フォームブロックプラグインのパスワード項目設置サンプル
{% if app.request.get('_route') == 'user_data' %}
{% if product is defined and product is not null %}
{% form_theme form 'Form/form_div_layout.twig' %}
<div class="ec-customerRole">
<div class="ec-pageHeader">
<h1>{{ 'front.shopping.nonmember'|trans }}</h1>
</div>
<div class="ec-cartRole">
<div class="ec-cartRole__progress">
@kurozumi
kurozumi / jan2asin.py
Last active April 26, 2023 09:28
【Python】JANコードからASINを取得する方法
from amazon.api import AmazonAPI
from amazon.api import LookupException, AsinNotFound
import sys
if __name__ == "__main__":
amazon = AmazonAPI(
"ACCESS_KEY",
"SECRET_KEY",
"ASSOC_TAG",
region="JP")
@kurozumi
kurozumi / oembed-fc2-video.php
Last active December 3, 2022 07:37
【ワードプレス】FC2動画をoEmebd機能(自動メディアリンク)に対応させるプラグイン
<?php
/*
Plugin Name: oEmbed FC2 Video
Version: 0.1-alpha
Description: Embed source from fc2 video.
Author: kurozumi
Author URI: http://a-zumi.net
Plugin URI: http://a-zumi.net
Text Domain: oembed-fc2-video
Domain Path: /languages
@kurozumi
kurozumi / capture.py
Last active August 17, 2021 15:49
【Python】OpenCVを使ってマックの内蔵カメラを起動して画面に人の顔が認識されたら白枠を表示させる方法
# coding: utf-8
import cv2
if __name__ == "__main__":
# 内蔵カメラを起動
cap = cv2.VideoCapture(0)
# OpenCVに用意されている顔認識するためのxmlファイルのパス
@kurozumi
kurozumi / index.twig
Created July 14, 2021 08:40
会員グループ管理::会員登録アドオン for EC-CUBE4で指定したパラメータ付きのURLで新規会員登録ページにアクセスすると新規会員登録完了時に会員グループが付与されるカスタマイズ方法
{% if app.request.get('type') == 'entry' or app.request.method == 'POST' %}
{{ include('@CustomerGroupEntry/default/Entry/hidden.twig', ignore_missing=true) }}
{% endif %}
@kurozumi
kurozumi / ShoppingCompleteListener.php
Created July 13, 2021 06:04
購入完了ページで会員に会員グループを設定する処理
<?php
/**
* This file is part of CustomerGroupProduct
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@kurozumi
kurozumi / ProductTrait.php
Last active July 13, 2021 06:00
Productエンティティに自動登録する会員グループを保存する項目を追加
<?php
/**
* This file is part of CustomerGroupProduct
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@kurozumi
kurozumi / ProductTypeExtension.php
Created July 13, 2021 06:00
商品登録ページに自動登録する会員グループを選択する高奥を追加
<?php
/**
* This file is part of CustomerGroupProduct
*
* Copyright(c) Akira Kurozumi <info@a-zumi.net>
*
* https://a-zumi.net
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.