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_helper' | |
describe RSpec, 'module isolation' do | |
module Example1 | |
def hoge | |
"example1" | |
end | |
end | |
module Example2 | |
def hoge |
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
#!/bin/sh | |
aws ec2 describe-tags --region ap-northeast-1 --filters "Name=resource-id,Values=`curl http://169.254.169.254/latest/meta-data/instance-id`" "Name=key,Values=elasticbeanstalk:environment-name" | jq -r .Tags[0].Value | |
# regionは適宜適宜してください。 |
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
<style> | |
.failover-play-btn { | |
width: 60px; | |
height: 60px; | |
background: rgba(255, 255, 255, 0.7) no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15' fill='dimgray'%3E %3Cpath d='M 0,1 12,7.5 0,14 z'/%3E %3C/svg%3E") 64% 50%/50%; | |
border-radius: 50%; | |
border: none; | |
cursor: pointer; | |
} | |
</style> |
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
/** | |
* usage: node screenshotsFromTimeline.js <input timeline data json> | |
* | |
* Derives a bunch of web page screenshot PNGs from a Chrome Timeline data JSON which can be saved in DevTools > Timeline recordings | |
* Runs with node.js | |
*/ | |
var util = require('util'); | |
var fs = require('fs'); | |
function usage() { |
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
/** | |
* class AutoQueue | |
* | |
* queue that runs the given process with an interval if some values are queued | |
* and stops if there is no value queued. | |
* 値がqueueされていれば一定間隔で与えられた関数に値を渡し、queueされていなければ黙っているqueue. | |
* | |
* @constructor | |
* @param {Function} func | |
* @param {number} interval |
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
--[[---------------------------------------------------------------------------- | |
Copyright 2014 S. Tanaka | |
All Rights Reserved. | |
-------------------------------------------------------------------------------- | |
URLEncoder.lua | |
Encodes any strings into URL encoded strings with a rule based on rawurlencode in PHP. |