Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / README.md
Created January 4, 2010 02:38
imagesLoaded() jquery plugin
@fumikito
fumikito / wp-customize-contactfields.php
Created October 22, 2010 15:40
WordPressのプロフィール編集画面でコンタクトフィールドをカスタマイズする
/**
* Customize contact fields on Profile admin panel
*
* @package WordPress
*/
/**
* WordPressのプロフィール画面に追加するコンタクトメソッド
*
@ilkka
ilkka / tag_cloud_tag.rb
Created November 22, 2010 20:07
Jekyll tag cloud / tag pages plugin
module Jekyll
class TagCloudTag < Liquid::Tag
safe = true
def initialize(tag_name, text, tokens)
super
end
def render(context)
html = ""
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@hail2u
hail2u / csslint-rules.md
Last active April 29, 2023 14:59
CSSLintのRulesの超訳

訳注

これは超訳です。

CSSLintは「なんでこんなルールなんだ…」とイラっとすることが多いですけど、それぞれにそれなりに理由があります。まぁ勿論無視するべきなルールとかもあります。例えば見出し要素の再定義禁止とかはHTML5に対するCSSなら無理な話です。そんなわけでどんな理由なのかを簡単に訳しました。無視するかどうかは自分で決めましょう!

この訳はCSSLintと同じライセンスで提供されます。

Possible Errors

@ukyo
ukyo / fs.js
Created December 18, 2011 20:24
tiny requestFileSytem Wrapper
//tiny requestFileSystem Wrapper
//author @ukyo
//apache license
//refer: http://d.hatena.ne.jp/shirokurostone/20111014/1318593601
var fs = (function(window){
var fs = {},
BlobBuilder = window.WebKitBlobBuilder || window.MozBlobuilder || window.MSBlobBuilder,
requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem,
@drewjoh
drewjoh / custom.js
Created January 27, 2012 13:55
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {
@ukyo
ukyo / markdown.html5.js
Created June 6, 2012 00:33
markdown.html5.js
// Released under MIT license
// Copyright (c) 2012 Syu Kato <ukyo.web@gmail.com>
markdown.toHTML5 = function(source, dialect, options) {
return markdown.renderJsonML((function to5(tree, level) {
var i, m,
indices = [],
hx = 'h' + level,
n = tree.length,
blocks = [];
@Abban
Abban / WordPress Theme Customizer Sample.php
Created June 21, 2012 21:09
WordPress Theme Customizer Sample
<?php
function themename_customize_register($wp_customize){
$wp_customize->add_section('themename_color_scheme', array(
'title' => __('Color Scheme', 'themename'),
'priority' => 120,
));
// =============================
@noromanba
noromanba / flatten.js
Created June 22, 2012 21:42
Greedy flatten function for Array in JavaScript via http://ptech.g.hatena.ne.jp/noromanba/20120622/1340396466
// flatten.js
// @author noromanba (https://www.hatena.ne.jp/noromanba/)
// @license Public Domain https://creativecommons.org/licenses/publicdomain/
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce
var flatten = function (ary) {
return ary.reduce(function (p, c) {
return Array.isArray(c) ? p.concat(flatten(c)) : p.concat(c);
}, []);
};