This file contains 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
HistoryWard.startBrutally() | |
window.addEventListener(HistoryWard.PUSHSTATE, ((e)-> | |
console.log 'addEventListener' | |
console.log e | |
display.innerHTML = if e.detail.state.param == 'param3' | |
e.preventDefault() | |
'not pushState' | |
else | |
'pushState: ' + write(e.detail) |
This file contains 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 flash.text.Font; | |
@:font("../lib/font-awesome/fonts/fontawesome-webfont.ttf") class Fa extends Font { | |
public static var name:String = (function(){ | |
Font.registerFont(Fa); | |
return new Fa().fontName; | |
})(); | |
public static var char:Dynamic = { | |
adjust: "\uf042", | |
adn: "\uf170", |
This file contains 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
interface Stack{ | |
up:()=>void, | |
down:()=>void | |
} | |
export default class HistoryStack { | |
private history:Stack[] = []; | |
private position:number = 0; | |
constructor(public length = 10){ |
This file contains 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
const assert = require('power-assert'); | |
import HistoryStack from './src/models/history-stack'; | |
describe('HistoryStack', ()=> { | |
describe('', ()=> { | |
it('基本', ()=> { | |
let stack = new HistoryStack(); | |
let target = 0; | |
let action = (n)=>{ |
This file contains 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
interface Stack { | |
up:()=>void, | |
down:()=>void | |
} | |
export default class HistoryStack { | |
// 固定長配列と終端を表すundefinedで循環配列として利用する | |
private history:Stack[][] = []; | |
private position:number = 0; |
This file contains 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
export const mix = (superclass) => new MixinBuilder(superclass); | |
class MixinBuilder { | |
constructor(private superclass: any) { | |
} | |
mix(...mixins: any[]) { | |
return mixins.reduce((c, mixin) => mixin(c), this.superclass); | |
} |
This file contains 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
require 'rails_erd/domain/relationship' | |
module RailsERD | |
class Domain | |
class Relationship | |
class << self | |
private | |
def association_identity(association) | |
Set[association_owner(association), association_target(association)] |
This file contains 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
# chromedriver configuration | |
# chrome の起動オプションが使える http://peter.sh/experiments/chromium-command-line-switches/ | |
default_args = %w( | |
--window-position=2560,0 | |
) | |
# ブラウザの外枠 (スクリーンショット撮って計測しよう) | |
chrome_frame_offset = { | |
w: 10, |
This file contains 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
<?php | |
$path = $_SERVER["SCRIPT_FILENAME"]; | |
if(preg_match("/\.html$/", $path)){ | |
chdir(dirname($path)); | |
return require($path); | |
} | |
return false; |
This file contains 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
require 'active_record' | |
require 'active_support/hash_with_indifferent_access' | |
require 'rspec' | |
require 'mysql2' | |
DATABASE_NAME = :sql_playground_database.to_s | |
DATABASE_CONFIGURATION_BASE = { | |
adapter: :mysql2, | |
host: :localhost, | |
username: ENV['MYSQL_USER_NAME'], |