Skip to content

Instantly share code, notes, and snippets.

@kazukomurata
kazukomurata / composer.json
Created April 1, 2023 01:19
Demo: Drupal and ClamAV
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
@kazukomurata
kazukomurata / ExampleTest.php
Created December 3, 2021 01:21
Drupal Kernelテストのサンプル
<?php
namespace Drupal\Tests\example_module\Kernel;
use Drupal\Core\Config\FileStorage;
use Drupal\KernelTests\KernelTestBase;
use Drupal\node\Entity\Node;
use Drupal\taxonomy\Entity\Term;
use Drupal\Tests\ConfigTestTrait;
use Drupal\Tests\node\Traits\NodeCreationTrait;
@kazukomurata
kazukomurata / drupal.google_analytics_counter.8.x-3.0-alpha19.d9.patch
Created September 12, 2020 01:19
Drupal Google Analytics Counter 8.x-3.0-alpha19 をDrupal9で動かすためのパッチ
diff --git a/google_analytics_counter.info.yml b/google_analytics_counter.info.yml
index c6fa03c..de083d8 100755
--- a/google_analytics_counter.info.yml
+++ b/google_analytics_counter.info.yml
@@ -2,5 +2,6 @@ name: 'Google Analytics Counter'
type: module
description: 'Lightweight page view counter drawing on data collected by Google Analytics.'
core: 8.x
+core_version_requirement: ^8 || ^9
package: Statistics
@kazukomurata
kazukomurata / gist:8b00fc82d996de54f98dfe0bd9ef7617
Created October 14, 2017 11:32
素のreactを使ったサンプル
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<script src="https://cdn.jsdelivr.net/react/15.0.0/react.js"></script>
<script src="https://cdn.jsdelivr.net/react/15.0.0/react-dom.js"></script>
<title>素のReact</title>
</head>
<body>
<div id="l-content"></div>
/**
* @file
* AWS configuration file.
*/
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$base_root = 'https';
}
// We're behind a proxy that talks to the web server via HTTP.
elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {