Skip to content

Instantly share code, notes, and snippets.

View FiNGAHOLiC's full-sized avatar
🐰
Strugglin'

Yukihiko Okuyama FiNGAHOLiC

🐰
Strugglin'
  • Root Communications
  • Tokyo Japan
  • 16:05 (UTC +09:00)
View GitHub Profile
@FiNGAHOLiC
FiNGAHOLiC / keyframes-sass-output.css
Created December 6, 2012 10:14 — forked from mirisuzanne/keyframes-sass-output.css
A Keyframes Mixin (Sass only)
@-webkit-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
100% { background-color: #ccffff; } }
@-moz-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
100% { background-color: #ccffff; } }
@-ms-keyframes bgcolor { 0% { background-color: #ffccf2; }
50% { background-color: #ccffcc; }
@FiNGAHOLiC
FiNGAHOLiC / CSS3 Media Queries Template
Created December 5, 2012 09:30
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@FiNGAHOLiC
FiNGAHOLiC / gist:3986821
Created October 31, 2012 12:35
setTimeout wrapper
// http://www.intridea.com/blog/2011/2/8/fun-with-jquery-deferred
$.timeout = function(time){
return $.Deferred(function(dfd){
setTimeout(dfd.resolve, time);
}).promise();
}
@FiNGAHOLiC
FiNGAHOLiC / gist:3761173
Created September 21, 2012 12:18
Micro Clearfix Placeholder Selectors
// micro-clearfix
// http://nicolasgallagher.com/micro-clearfix-hack/
%micro-clearfix{
zoom:1;
&:before,
&:after{
content:'';
display:table;
}
&:after{
@FiNGAHOLiC
FiNGAHOLiC / gist:3755452
Created September 20, 2012 11:46
CSS3 ribbon mixin
// ribbon
@mixin ribbon($width, $x, $y, $color){
position:relative;
z-index:1;
&:after{
content:'';
@include position-absolute(bottom, $y, right, $x, -1);
border:{
width:$width;
style:solid;
@FiNGAHOLiC
FiNGAHOLiC / _css3.scss
Created September 14, 2012 07:41 — forked from fortybillion/_css3.scss
Common CSS3 mixins for SASS
/* Commonly used mixins for CSS3 in SASS
by Ben Sargent (2012)
www.brokendigits.com
*/
/* generically prefix any property name */
@mixin prefix($name, $value) {
-webkit-#{$name}: $value;
-moz-#{$name}: $value;
@FiNGAHOLiC
FiNGAHOLiC / sessionStorage.js
Created July 12, 2012 11:13 — forked from Takazudo/sessionStorage.js
sessionStorage polyfill
/*
* Based on: http://www.quirksmode.org/js/cookies.html
* and https://github.com/wojodesign/local-storage-js/blob/master/storage.js
* and https://gist.github.com/350433
* License: http://www.opensource.org/licenses/MIT
*/
(function(window) {
'use strict';
window.sessionStorage = window.sessionStorage || {
@FiNGAHOLiC
FiNGAHOLiC / jquery.ba-tinypubsub.js
Created July 2, 2012 12:36 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@FiNGAHOLiC
FiNGAHOLiC / comma-first-var.js
Created May 10, 2012 13:52 — forked from isaacs/comma-first-var.js
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
@FiNGAHOLiC
FiNGAHOLiC / cssmin.js
Created May 1, 2012 08:48 — forked from Takazudo/cssmin.js
grunt cssmin sqwish task
/**
* cssmin tasks
* sqwish: https://github.com/ded/sqwish
*/
module.exports = function(grunt){
var log = grunt.log;
var sqwish = require('sqwish');
grunt.registerMultiTask('cssmin', 'minify css by sqwish', function() {