Skip to content

Instantly share code, notes, and snippets.

View FiNGAHOLiC's full-sized avatar
🐰
Strugglin'

Yukihiko Okuyama FiNGAHOLiC

🐰
Strugglin'
  • Root Communications
  • Tokyo Japan
  • 21:15 (UTC +09:00)
View GitHub Profile
git status | grep deleted: | awk '{print $3}' | xargs git rm
# ただしカラースキーム付きの場合は保証しない.
@FiNGAHOLiC
FiNGAHOLiC / media-query-mixin.scss
Created December 7, 2012 11:32 — forked from Snugug/media-query-mixin.scss
Media Query Sass Mixin
//////////////////////////////
// Generalized Media Query Mixin
//
// Requires Sass 3.2+
// Until released:
// (sudo) gem install sass --pre
//////////////////////////////
@mixin media-query($value, $operator: 'min-width', $query: 'screen') {
@media #{$query} and (#{$operator}: #{$value}) {
@content;
@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 / _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() {
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}