BrowserStack とは BrowserStack とは、クロスブラウザ(OS含む)による動作確認を手軽に行える環境を提供しているサービスです。 例えば、BrowserStack 側のサーバで起動している各種ブラウザ環境を、こちらのブラウザから利用したりすることができます。 その中に Automate という、コードからその環境を利用できる仕組みがあり、今回はそれを Node.js から使ってみたいと思います。 当記事のゴール Travis CI 上で、 express アプリケーションを起動し、 mocha で書いたテストコードを使い、 BrowserStack Automate 環境で、 テストが出来ること。 BrowserStack アカウントを作成する まずはアカウントの作成が必要になるので、トップページ から道なりに登録してください。 メールアドレスとパスワードだけで登録で
@JUNP_Nです。Macが起動しない!そんな時に自分でできる対処方法が7つあります。ジーニアスバーに持ち込んだとしても、これ以上のことは対応できないので自分でここまでやっておけると良いと思います。Macユーザーの人は忘れずに覚えておきましょう。 Macが起動しなかった場合に自分でできる対処法まとめ「Macが起動しなくなった」そんな時にどうしたらいいのか知っていますか? 「ディスクユーティリティ」を使用したメンテナンスを定期的に行うことも大事ですが、Macが突然動かなくなるという不測の事態が起こった際には、以下の7つの方法を試してみると修復できるかもしれません。 Macが起動しない時の対処法(1)「NVRAM/PRAMリセット」Macに何かしらの問題が発生したらまずやってみてくださいとAppleから言われるのは「NVRAM/PRAMリセット」です。「Macの設定を記憶していNVRAM/PR
ES6 arrow functions are often a compelling alternative to Function.prototype.bind(). Extracting methods # If an extracted method is to work as a callback, you must specify a fixed this, otherwise it will be invoked as a function (and this will be undefined or the global object). For example: obj.on('anEvent', console.log.bind(console)) An alternative is to use an arrow function: obj.on('anEvent',
When implementing realtime displays of time-series data, we often use the x-axis to encode time as position: as time progresses, new data comes in from the right, and old data slides out to the left. If you use D3’s built-in path interpolators, however, you may see some surprising behavior: Why the distracting wiggle? There are multiple valid interpretations when interpolating two paths. Here’s th
2012-01-14: content_for_in_controllers を gem にしてくれた人がいます。 thanks! Rails 3.1 では HTTP Streaming が導入されますが、 stream ON だと template と layout の処理順序がいままでの rails のように template -> layout ではなく layout 前半 -> template -> layout 後半 という自然な流れになるのですが、 content_for が絡むとややこしいことになります (詳しくは action_controller/metal/streaming.rb のコメントを参照)。 この関係で、 layout 前半で content_for :bar が先に実行されていることを期待した yield :bar が空振りしないように、 layout
D3’s selections can be hierarchical, much like the elements and data they join. Consider a table: <table> <thead> <tr><td> A</td><td> B</td><td> C</td><td> D</td></tr> </thead> <tbody> <tr><td> 0</td><td> 1</td><td> 2</td><td> 3</td></tr> <tr><td> 4</td><td> 5</td><td> 6</td><td> 7</td></tr> <tr><td> 8</td><td> 9</td><td> 10</td><td> 11</td></tr> <tr><td> 12</td><td> 13</td><td> 14</td><td> 15</td
This is an intro to creating your own animations and transitions in d3.js. In interactive visualisation, there is the word reactive. Well, maybe not literally, but close enough. The fact is that reactivity, or the propension of a visualisation to respond to user actions, can really help engage the user in a visualisation, and help them understand its results. Both of which are usually good things.
React Bootstrap Star Ratingを作った. 作ったので軽く紹介する. GitHubはReact Bootstrap Star Rating. React Bootstrap Star Rating See Also React Bootstrap Star Rating 作り始めた動機はあるプロジェクトでBowerでjQueryが使われており、 commitするにあたってそれらを殲滅しnpmとReactを導入しようと思ったが、 どうもReactには良い感じのStar rating libraryが無かったから. Star Rating in React npmのdownload statsで一番だったのはreact-star-rating (939 downloads in the last month) で、 それ以外はほとんど使われていないようだった. react
ピクシブ株式会社 Advent Calendar 2015、19日目の記事です。 qiita.com こんにちは、愛らしくも憎らしいJavaScriptを書いてご飯を食べている @geta6 です。業務では pixiv Sketch というサービスの開発や運営に携わっています。 pixiv Sketchでは、node.jsとReact/Fluxibleを使用してサーバーとクライアントを同じコードベースで動作させるIsomorphicな構成を採用しています。 このプロジェクトでコードレビューをしていて、チームメンバーがつまずきやすいと感じたのが『FluxにおけるActionとStoreのどちらに何を実装するべきか』という点でした。 そこで、本日は『ActionとStoreとの適切な責務の持たせ方』について話をしたいと思います。 ReactとFluxについておさらい 今年の4月にこんなスライド
index.md express実践入門 自己紹介 小川充 mitsuruog フロントエンドエンジニア Javascript, HTML, CSS, Node.js, API設計とか認証とか 2015/5月入社(約半年) はじめに あくまで「俺が考える最強のexpress実践入門」です。 初学者がexpressを攻略する上でのつまづくポイントと、中規模開発をターゲットにしたベストプラクティスを経験ベースでお話します。 おそらく、初〜中級者向けの内容です。 本コンテンツの使い方 express初心者 初学者向けチュートリアル(dotinstallとか)のあとに express経験者 ご自身のコードの見直しに 他の言語の経験者 他の言語の「あれ」は、node.jsでは「これ」のマッピングに (※)中で紹介するコードは抜粋したものであり、そのままでは動作しない場合があります。ご注意ください。
Promises are very simple once you get your head around them, but there are a few gotchas that can leave you with your head scratching. Here are a few that got me. Nested Promises You get a whole bundle of promises nested in eachother: loadSomething().then(function(something) { loadAnotherthing().then(function(another) { DoSomethingOnThem(something, another); }); }); The reason you’ve done this is
Tech Stack Intelligence provides real-time visibility into all the developer tools, services, and packages you're using internally, down to the version level, across all your Git repos. StackShare EnterpriseOur platform gives companies real-time visibility into all the tech stacks in use across their engineering teams. StackShare Enterprise helps CTOs and other technical leaders make smarter decis
Fluentdはデータを流すのに非常に便利なツールでそこら中で使われている(個人調べ)。そのため、なんかいろんなところで設定を見るのであるが、タグに情報が付いていたりフィールドに情報がついていたりして、あれ、これどうなってるんだっけ感に襲われることがよくある。 このあたり自分でも混乱しがちなので、普段どのように考えているかだいたいまとまった気がしたところで書いておくことにした。 Fluentdのデータ構造 まずはFluentdのデータ構造を知っておいた方が良い。Fluentdの内部データはMessagePackで符号化されているが、Fluentdのデータ構造は単なるハッシュではなく、時刻(time)とタグ(tag)という属性を持っている。次のような感じだ。 レコード レコード(record)は入力されたデータそのものであり、tailプラグインであれば、tailした1行のデータに相当する。重
Ansible getting started Getting started with Ansible Getting started with Execution Environments Installation, Upgrade & Configuration Installation Guide Ansible Porting Guides Using Ansible Building Ansible inventories Using Ansible command line tools Using Ansible playbooks Protecting sensitive data with Ansible vault Using Ansible modules and plugins Using Ansible collections Using Ansible on W
Ansibleは非常にシンプルかつ強力なツールですが、 様々な設定方法・書き方が許容されるがゆえにやり過ぎると収集がつかなくなります。 そんな若干やりすぎかもしれない設定の一部を晒してみます。 タイトルは若干大げさですが、お勧めするような設定ではないという自虐的な意味を込めてます。 production/staging environment variables Ansibleである程度の規模のプロビジョニングをするようになると 公式DocumentにもあるBest Practices に倣うと思いますが、 この時課題の1つとなるのがproductionとstagingで異なる環境変数をどう管理するかです。 検索してみると何種類かのやり方がHitするのですが、うちでやっている方法も書いてみます。 このやり方はAnsible始めた頃に同僚から教えてもらった方法です。 inventory/ p
多種多様な構成のサーバーを Ansible で管理する場合、単一のベストプラクティスツリーに押し込むのは管理が大変すぎて現実的ではないなとおもい、どうしたものかなと悩んでいました。で、最近やっとこれかなという構成ができたので共有してみます。 何が問題か? ロールには共用できるものとできないものがある、それがいっしょこたに混ざるのが嫌 無理に共用できるようにと変数を多用するととても管理が大変。変数も覚えられないし、テストが大変 読み込むファイルのパスが大元のymlからの相対パスであり、include ではディレクトリ階層での整理が難しい -l で対象サーバーを絞り込んでも全てのタスクが表示され、skipped, skipped, skipped と関係ない task 表示がターミナルが埋まって見づらい そして、たどり着いたオレオレベストプラクティス まとめて管理したいサーバーグループ毎にベス
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く