This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
require 'csv' | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'rmagick' | |
def create_image(width, height, filename, ext) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/css3/background-size"; | |
$map: sprite-map("sprites/*.png", $layout:smart); | |
$map-img: sprite-url($map); | |
@mixin sprite-background($name) { | |
display: inline-block; | |
width: image-width(sprite-file($map, $name)) / 2; | |
height: image-height(sprite-file($map, $name)) / 2; | |
background-image: $map-img; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var palette = { | |
"Butter": ["#fce94f", "#edd400", "#c4a000"], | |
"Orange": ["#fcaf3e", "#f57900", "#ce5c00"], | |
"Chocolate": ["#e9b96e", "#c17d11", "#8f5902"], | |
"Chameleon": ["#8ae234", "#73d216", "#4e9a06"], | |
"Sky Blue": ["#729fcf", "#3465a4", "#204a87"], | |
"Plum": ["#ad7fa8", "#75507b", "#5c3566"], | |
"Scarlet Red": ["#ef2929", "#cc0000", "#a40000"] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hoge extends createjs.Container | |
constructor: () -> | |
@initialize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function(a){a.fn.simpletab=function(){return this.each(function(){for(var b,c,d,e,f=a(this).find("a"),g=0,h=f.length;h>g;g++)c=a(f[g]),d=c.attr("href"),d=a(d),d.hide().bind("stactive stinactive",function(b,c){e=a(this),c=="#"+e.attr("id")&&("stactive"==b.type?e.show():e.hide())}),c.hasClass("active")&&d.show();f.click(function(){if(e=a(this),!e.hasClass("active")){a.event.trigger("stactive",[e.attr("href")]);for(var d=0,g=f.length;g>d;d++)b=f[d],c=a(b),b!=this?(c.removeClass("active"),a.event.trigger("stinactive",[c.attr("href")])):c.addClass("active")}})})}})(jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elementId = "testCanvas"; | |
var stageWidth = 300; | |
var stageHeight = 300; | |
var backgroundColor = "#abc"; | |
var stage; | |
function init() { | |
var canvas = document.getElementById(elementId); | |
canvas.style.width = stageWidth + "px"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<input type="checkbox" checked="checked" /> | |
<input type="checkbox" /> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selectElems = document.getElementsByTagName("select"); | |
for (var i = 0, iz = selectElems.length; i < iz; i++) { | |
selectElems[i].onfocus = selectElems[i].blur; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uncompress | |
;(function ($) { | |
$.fn.visible = function (visible, invisible) { | |
if ((typeof visible !== "function") && (typeof invisible !== "function")) { | |
return this; | |
} | |
return this.each(function () { | |
if ($(this).css('display') === 'none') { | |
invisible.apply(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
var dotSize = 3; | |
var dotColor = "#abc"; | |
var canvas = $("<canvas/>").attr({ | |
width: dotSize * 2, | |
height: dotSize * 2 | |
})[0]; | |
var ctx = canvas.getContext('2d'); | |
ctx.fillStyle = dotColor; | |
ctx.beginPath(); |