Skip to content

Instantly share code, notes, and snippets.

@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@xl1
xl1 / gist:4353507
Last active September 6, 2016 09:25
CSS でフォームの値を読む

CSS でフォームの値を読む

これは CSS Programming Advent Calendar 2012 の 21 日目の記事です。がすでに 22 日になってしまいました。ごめんなさい。

7 日目の記事(ドラッグをキメる) で、input 要素の value の値は「CSS で検知できない」と書きましたが、嘘です。ごめんなさい。

それ実は CSS でできるよ!

Client-Side Form Validation の仕組みを無理やり使います。 inputpattern 属性と :valid, :invalid 疑似クラスで、特定の文字列のみに反応してスタイルを適用できます。

@watilde
watilde / kimigayo.js
Last active August 29, 2015 13:59
オクターブ表記は国際式。
var song = [
{
key: 'c',
bpm: 120,
frequency: 440,
time: '4/4',
notes: [
[
{
number: 'D4',
module.exports = [
{
number: 'D4',
length: 1
},
{
number: 'C4',
length: 1
},
{
@milo
milo / github-webhook-handler.php
Last active July 26, 2023 15:29
GitHub Webhook Handler
<?php
/**
* GitHub webhook handler template.
*
* @see https://docs.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
*/
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
@lostandfound
lostandfound / dividing_punctuation_marks
Last active June 2, 2021 08:38
区切り約物類の後ろの全角空白をめぐって小林敏先生から頂いたメール
イースト株式会社
 高瀬 拓史 様
   小林敏です
hiroshi takase さん wrote
> ご無沙汰しております。イーストの高瀬です。
こちらこそ,ご無沙汰しております.
@matori
matori / clearfix.scss
Created January 5, 2015 09:36
clearfix mixin
@charset "UTF-8";
/// `$use-before` は `$collapse-margin` が `false` の場合のみ意味を持つ。引数なし(初期値)だと micro clearfix が生成される。
/// @group util
/// @param {Bool} $collapse-margin (false) - マージンの相殺を許可するかどうか
/// @param {Bool} $use-before (true) - `:before` 擬似要素を出力するかどうか
/// @link http://nicolasgallagher.com/micro-clearfix-hack/ A new micro clearfix hack – Nicolas Gallagher
/// @link http://kojika17.com/2013/06/clearfix-2013.html floatを解除する手法のclearfix と 次世代のレイアウトの話|Web Design KOJIKA17
@mixin clearfix($collapse-margin: false, $use-before: true) {
/* Converted from http://hail2u.net/styles/style.min.css */
html {
font-family: sans-serif;
}
html {
-ms-text-size-adjust: 100%;
}
html {
@matori
matori / removehash.js
Created February 12, 2015 02:14
URL からハッシュ値を取得したあとにハッシュを消して履歴を修正
// @link http://stackoverflow.com/a/5298684
var hashString = location.hash.substr(1); // remove '#'
history.replaceState('', document.title, window.location.pathname);