- 名前
- 和田 卓人 (Takuto Wada)
- hatena
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
module.exports = function (api) { | |
const presets = []; | |
const plugins = []; | |
let retainLines = false; | |
let comments = true; | |
if (api.env('production')) { | |
plugins.push('babel-plugin-unassert'); | |
retainLines = true; | |
} |
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
Show hidden characters
{ | |
"env": { | |
"development": { | |
"presets": [ | |
"babel-preset-power-assert" | |
] | |
}, | |
"production": { | |
"plugins": [ | |
"babel-plugin-unassert" |
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
var gulp = require('gulp'); | |
var mocha = require('gulp-mocha'); | |
gulp.task('test', function () { | |
require('espower-coffee/guess'); | |
return gulp | |
.src('test/**/*.coffee') | |
.pipe(mocha()); | |
}); |
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 'spec/runner/formatter/progress_bar_formatter' | |
class JojoRushFormatter < Spec::Runner::Formatter::ProgressBarFormatter | |
def example_failed(example, counter, failure) | |
@output.print colorize_failure('無駄', failure) | |
@output.flush | |
end | |
def example_passed(example) | |
@output.print green('オラ') | |
@output.flush |
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
exports = module.exports = global; | |
var path = require('path'); | |
QUnit = require(path.join(path.dirname(require.resolve('qunit-tap')), '..', 'vendor', 'qunit', 'qunit', 'qunit')).QUnit; | |
require("qunit-tap").qunitTap(QUnit, require("sys").puts, { noPlan: true }); | |
QUnit.init(); | |
QUnit.config.updateRate = 0; | |
exports.assert = QUnit; |
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
/* | |
* (c) 2009 Takuto Wada; MIT License | |
* JavaScript 1.8 compliant Array#reduce that also works with old prototype.js | |
* usage: load this AFTER prototype.js | |
*/ | |
(function () { | |
// prototype.js's Array#reduce is removed since 1.6.1_rc2 | |
// see: http://github.com/sstephenson/prototype/commit/b34355653e1a663764fd8f69b4915f966c58cf55 | |
if (typeof Prototype !== 'undefined' && /^1\.(?:[0-5]\.\S+|6\.(?:0(?:\.\d)?|1_rc1))$/.test(Prototype.Version)) { |
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 'yaml' | |
require 'active_record' | |
class ActiveRecord::Migrator | |
class << self | |
TARGET_METHODS = %w[up down] | |
TARGET_METHODS.each do |name| | |
define_method("#{name}_with_database_dump") do |*args| | |
dump_current_database |
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
# -*- coding: utf-8 -*- | |
require 'net/telnet' | |
module Filetter | |
class MozRepl | |
def self.run | |
begin | |
telnet = Net::Telnet.new("Port" => 4242) {|c| print c} | |
telnet.cmd("content.location.reload(true)") |
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 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'amazon/aws/search' | |
require 'erb' | |
hatena_template = <<-EOT | |
*** <%= book.item_attributes.title %> | |
ASIN:<%= book.asin %>:detail |
NewerOlder