Skip to content

Instantly share code, notes, and snippets.

ykhs ykhs

Block or report user

Report or block ykhs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:890605
--- a/autoload/zencoding.vim
+++ b/autoload/zencoding.vim
@@ -456,7 +456,11 @@ function! s:zen_toString_html(settings, current, type, inline, filters, itemno,
else
if inline == 0
if stridx(','.settings.html.empty_elements.',', ','.current.name.',') != -1
- let str .= " />\n"
+ if &ft != 'xhtml'
+ let str .= ">\n"
+ else
@ykhs
ykhs / _clearfix.scss
Created Apr 10, 2011
個人サイトに Sass を導入してみた
View _clearfix.scss
@mixin clearfix {
clear: both;
zoom: 1;
&:after {
content: ".";
display: block;
height: 0;
clear: both;
@ykhs
ykhs / site.css
Created Apr 10, 2011
個人サイトに Sass を導入してみた(CSS 生成後)
View site.css
/*!
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.3.0
build: 3167
*/
html {
color: #000;
background: #FFF; }
@ykhs
ykhs / _grid.scss
Created Apr 18, 2011
960 Grid System Using Sass.
View _grid.scss
/*!
Variable Grid System.
Learn more ~ http://www.spry-soft.com/grids/
Based on 960 Grid System - http://960.gs/
Licensed under GPL and MIT.
*/
// Containers
//----------------------------------------------------------------------------------------------------
@ykhs
ykhs / rebaseall.bat
Created Apr 21, 2011
Cygwin + git-svn で良く出てくる fatal error の対処
View rebaseall.bat
cd /d C:\cygwin\bin
ash rebaseall -v
pause
View gist:960624
(function ($) {
$(function () {
// jQuery の要素集合をキャッシュ
var $slider_root = $('#slider'),
$slider_ul = $slider_root.find('ul'),
$slider_li = $slider_ul.find('li'),
sliderWidth = $slider_li.outerWidth(true) * $slider_li.size(),
viewWidth = 800;
@ykhs
ykhs / gist:1048792
Created Jun 27, 2011
オレオレ addEvent
View gist:1048792
function addEvent(element, type, handler, data, context) {
if (!element) { return false; }
if (!handler) { return false; }
context = context || element;
var fn = function (e) {
e = e || win.event;
View backbone-cacheSync.js
var collection = Backbone.Collection.extend({
originalSync: Backbone.sync,
sync: function(method, model, options) {
var originalSuccess, cache;
if (method !== 'read') {
this.originalSync(method, model, options);
@ykhs
ykhs / flattenHeights.js
Created May 23, 2012
要素の高さ揃えたい
View flattenHeights.js
function flattenHeight(elements) {
var maxHeight, i, l, defaultView;
maxHeight = 0;
i = 0;
l = elements.length;
defaultView = document.defaultView || {};
if (defaultView.getComputedStyle) {
View gist:2949050
Array.apply(null, Array(100)).forEach(function(x, i) {
console.log(i + 1);
});
You can’t perform that action at this time.