Skip to content

Instantly share code, notes, and snippets.

これは何

Adobe Kuler からいい感じの色の組み合わせを抜いてくるスクリプト です。 Kuler API というのがあったらしいけど今見たら提供されてなかったので書いた。 自己責任で使ってください。

getHexBackgroundColor

http://stackoverflow.com/questions/3048838/jquery-css-color-value-returns-rgb をそのままコピーしてます。

@tecking
tecking / SDHelper.php
Last active August 29, 2015 14:20
パンくずリストに構造化データを追記する baserCMS 用独自ヘルパー
<?php
/**
* SDHelper パンくずリストに構造化データを追記するヘルパー
* テーマファイル内で $this->SD->foo() の記述で呼び出す
*/
class SDHelper extends AppHelper {
/**
* ヘルパー
@tecking
tecking / 高志高校40回卒同窓会『ドキッ! みどり葉の集いが迫ってきちゃったYO!』.md
Last active August 10, 2017 08:38
高志高校40回卒同窓会『ドキッ! みどり葉の集いが迫ってきちゃったYO!』

イメージ画像

残暑お見舞い申し上げます! てっきんです!

さて、2010年の『ドキッ! 真夏の大同窓会』から早7年。そろそろ久しぶりにちょっとした集まりをやってみようじゃないですかということで、40回卒の同窓会イベントを企画しました。

ん? なんで「7年」という中途半端な時期に?

そう感じたそこのあなた! 鋭い! 実に鋭い!

@tecking
tecking / force-https-htaccess.txt
Created November 28, 2018 08:45 — forked from fillipetech/force-https-htaccess.txt
Force https #https #security
RewriteEngine On
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
# [NC] is a case-insensitive match
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@tecking
tecking / tips.md
Last active October 9, 2019 13:05
Local by Flywheelのサイトフォルダを復活させる場合にエラーが出るときの対策

How can I restore a site from a Local site folder?に沿って復活させようとすると myloader コマンドをたたいたときに

** (myloader:828): CRITICAL **: Error restoring local.wp_posts from file local.wp_posts.sql: Table 'local.wp_posts' doesn't exist

というようなエラーが出てDBを復帰できない。

そこで、次のようなコマンドをたたいて *.sql ファイルの先頭に1行挿入する。

@tecking
tecking / duplicateJamboard.js
Last active September 8, 2022 00:53
Google Jamboard を複製して URL 一覧を作成するだけの Google Apps Script (GAS)
/*
* Google Jamboard を複製して URL 一覧を作成するだけの Google Apps Script (GAS)
* 2つの学級 A, B に、それぞれ10個の Jamboard を設ける例
* Jamboard のファイル名と URL をペアにした一覧表をスプレッドシートで出力
*/
const folderId = 'TARGET_FOLDER_ID';
const templateFileId = 'TEMPLATE_JAMBOARD_FILE_ID';
const className = [
'A', 'B'