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
def async_test | |
q = SizedQueue.new(1) | |
yield(Proc.new{ q.push :done }) | |
q.pop | |
end | |
it '結果が1であること' do | |
async_test do |finish| |
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
FROM ruby:2.4.0-alpine | |
ENV LANG ja_JP.UTF-8 | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add --update\ | |
build-base \ | |
ruby-dev |
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
npm install twitter | |
node search.js | jq .statuses | jq .[] | jq '.text, .created_at, .id_str' |
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
FROM alpine:3.3 | |
RUN apk add --no-cache curl | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY cacert.pem /usr/src/app/ |
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 allFilesStat = files | |
.filter((f) => f.endsWith('json')) | |
.map((f) => fsp | |
.stat(`${directory}/${f}`) | |
.then((stats) => ({ | |
name: f, | |
mtime: stats.mtime | |
})) | |
) |
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
process.stdin.on('readable', () => { | |
var chunk = process.stdin.read(); | |
if (chunk !== null) { | |
console.log(chunk) | |
} | |
}) |
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
echo 'デイリー' | node . |
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
<!DOCTYPE html> | |
<body> | |
<form id="f" action="http://example.com" method="get"> | |
<button type="submit">送信</button> | |
<button id="button2">送信</button> | |
</form> | |
<script type="text/javascript"> | |
f.addEventListener('submit', (e) => { | |
console.log('hi') | |
}) |
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 cpx = require('cpx') | |
const { | |
Transform | |
} = require('stream') | |
class MyTransform extends Transform { | |
constructor(options) { | |
super(options); | |
} | |
_transform(data, encoding, callback) { |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
Resize the window and this document wraped and height of this document is changed. So, the table will move but the bottom boder of the table will not move. | |
<div style="transform: translate3d(0px, 0px, 0px);"> | |
</div> | |
<table style="border-collapse: collapse;"> | |
<thead style="border-bottom-width: 1px; border-bottom-style: solid;"> | |
<tr> |