Skip to content

Instantly share code, notes, and snippets.

View hdemon's full-sized avatar

Masami Yonehara hdemon

  • LINE
  • Fukuoka, Japan
  • 18:48 (UTC +09:00)
View GitHub Profile
@hdemon
hdemon / gist:9618393
Created March 18, 2014 11:38
3段divをやめよう.scss
%container_decoration {
position: relative;
content: " ";
display: block;
width: 100%;
}
@function middle-image-name($name) {
@return $container-image-path + $name + "__middle.png";
}
@hdemon
hdemon / sprite-background.scss
Last active August 29, 2015 14:00
retina対応のsprite background
// 使い方
//
// ui/button/*.pngをspriteにしたいとして、その中にmain_button-full.pngが存在するとき、.hogeのbackgroundにその画像を指定したい場合は、
//
// .hoge {
// @include sprite-background("ui/button/*.png", "main_button-full");
// }
//
// とする。なお、sprite-mapやsprite-urlを自前で定義する必要はない。
//
(?<=>).{1,}(?=</a>)
"use strict"
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig
coffee:
source:
expand: true,
cwd: 'lib/',
src: ['**/*.coffee'],
sinon = require('sinon')
chai = require('chai').use(require 'sinon-chai')
expect = chai.expect
PO = require '../../lib/part_one_movie.coffee'
knex = require('knex')(require '../../config/database_test')
describe "PartOneMovie", ->
describe "save", ->
context "when no error has caused during transaction", ->
beforeEach (done) ->
@hdemon
hdemon / gist:531f89c34fda0686205d
Last active August 29, 2015 14:05
binary_heap.coffee
class BinaryHeap
constructor: ->
@array = []
@rootIndex = 1
insert: (element) ->
@array.push element
@percolateUp @lastLeafIndex()
deleteMaximum: ->
require "json"
require "selenium-webdriver"
require "rspec"
require 'appium_lib'
include RSpec::Expectations
def desired_caps
{
caps: {
uncaught exception: Undefined index: tutorial_id (errno: 8) in /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php at line #222Undefined index: tutorial_id
in file: /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php line 222
#0 /var/log/p12501/smarty/3c9fdce5ac63683ecd7c939652426522^c197b8c57dcdfaba6b94e214615592a9b029a472.file.list.tpl.php(222): _hx_error_handler(8, 'Undefined index...', '/var/log/p12501...', 222, Array)
#1 /home/z-masami-yonehara/xgree/ffr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(180): content_54324a19336be6_12827079(Object(Smarty_Internal_Template))
#2 /home/z-masami-yonehara/xgree/ffr/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('dungeon/support...', NULL, NULL, NULL, true)
#3 /home/z-masami-yonehara/xgree/ffr/frontend/ffr/app/FFR_Renderer_Smarty3.php(36): Smarty_Inter
@hdemon
hdemon / yui.md
Last active August 29, 2015 14:11

3Dで唯ちゃん作ろうと思ったけど間に合わなかった。すみません。25日までに進捗あったら更新します。

function testZoomProperty() {
var cssString = 'zoom: 1;';
var elem = document.createElement('div');
elem.style.cssText = cssString;
return elem.style.cssText === cssString;
}