- https://www.blogger.com/profile/06523732940059799303
- https://twitter.com/rui314
- https://note.mu/ruiu
- https://qiita.com/ruiu
- https://medium.com/@ruiu
- http://turingcomplete.fm/
- https://www.youtube.com/user/rui314/videos
- https://plus.google.com/+RuiUeyama
- https://www.facebook.com/rui.ueyama/posts/10154196161113606
- http://ruiueyama.tumblr.com/
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
Error: Module did not self-register. | |
at Object.Module._extensions..node (internal/modules/cjs/loader.js:731:18) | |
at Module.load (internal/modules/cjs/loader.js:612:32) | |
at tryModuleLoad (internal/modules/cjs/loader.js:551:12) | |
at Function.Module._load (internal/modules/cjs/loader.js:543:3) | |
at Module.require (internal/modules/cjs/loader.js:650:17) | |
at require (internal/modules/cjs/helpers.js:20:18) | |
at bindings (/Users/shigerunakajima/page-rank-for-qiita/node_modules/bindings/bindings.js:81:44) | |
at Object.<anonymous> (/Users/shigerunakajima/page-rank-for-qiita/node_modules/libxmljs/lib/bindings.js:1:99) | |
at Module._compile (internal/modules/cjs/loader.js:702:30) |
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
~ node write-to-stream.js 1 | |
Write to a writable stream 1000 times | |
The script used approximately 4.82 MB | |
~ node write-to-stream.js 10 | |
Write to a writable stream 10000 times | |
The script used approximately 6.15 MB | |
~ node write-to-stream.js 100 | |
Write to a writable stream 100000 times | |
The script used approximately 19.12 MB | |
~ node write-to-stream.js 200 |
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 UsersController < ApplicationController | |
include ValidateAction | |
before_action :validate_and_return | |
validates :name, presence: true | |
def index | |
render json: User.where(name: params[:name]) | |
rescue ActiveRecord::RecordNotFound | |
head 404 |
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 osmosis = require('osmosis') | |
const assert = require('assert') | |
describe('アマゾンのトップページのリンクチェック', function() { | |
this.timeout(4000) | |
it('ヘルプがひらくこと', async() => osmosis | |
.get('https://www.amazon.co.jp/') | |
.find('#navbar .nav-fill a:last') | |
.follow('@href') | |
.find('title') |
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 node:alpine | |
RUN mkdir -p /app | |
COPY ./package.json /app/ | |
WORKDIR /app | |
RUN npm install | |
COPY src /app/src | |
RUN mkdir -p ./public/js |
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
grep -l -R [゛゙゜゚] . | ./nfd_to_nfc.sh |
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
describe 'thread_test' do | |
it 'locks thdead' do | |
q = SizedQueue.new(1) | |
main = Thread.current | |
Thread.new do | |
begin | |
expect(1).to eq(0) | |
rescue => e | |
main.raise e |
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
describe 'thread_test' do | |
it 'locks thdead' do | |
q = SizedQueue.new(1) | |
t = Thread.new do | |
begin | |
expect(1).to eq(0) | |
ensure | |
q.push '' | |
end |
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 opening | |
queue = Queue.new | |
yield -> (result) { queue.push result } | |
queue.pop | |
end | |
it '結果が1であること' do | |
result = opening do |curtain| |