Skip to content

Instantly share code, notes, and snippets.

View hdemon's full-sized avatar

Masami Yonehara hdemon

  • LINE
  • Fukuoka, Japan
  • 19:47 (UTC +09:00)
View GitHub Profile
require "json"
require "selenium-webdriver"
require "rspec"
require 'appium_lib'
include RSpec::Expectations
def desired_caps
{
caps: {
@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: ->
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) ->
"use strict"
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig
coffee:
source:
expand: true,
cwd: 'lib/',
src: ['**/*.coffee'],
(?<=>).{1,}(?=</a>)
@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を自前で定義する必要はない。
//
@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";
}
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# Generated by Chef for www4177uo
#
# Local modifications will be overwritten.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
core@vxxx-xxx-xxx-xxx ~ $ sudo coreos-install -d /dev/vda
Downloading and verifying coreos_production_image.bin.bz2...
gpg: Signature made Mon Feb 17 23:01:34 2014 UTC using RSA key ID xxxxxxxx
gpg: key xxxxxxxx marked as ultimately trusted
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "CoreOS Buildbot (Offical Builds) <[email protected]>"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed