OpenResty/Lua 70+ Advanced Programming Skills and Optimization tips
OpenResty/Lua 70+ Advanced Programming Skills and Optimization tips
Join 150K+ monthly readers. In-depth articles on Node.js, Microservices, Kubernetes and DevOps. 2015 was the year of React with tons of new releases and developer conferences dedicated to the topic all over the world. For a detailed list of the most important milestones of last year, check out our React in 2015 wrap up. The most interesting question for 2016: How should we write an application and
Yeah, ok, it's a touch bold to talk about something being the thing of the year as early as January, but the potential of the web streams API has gotten me all excited. TL;DR: Streams can be used to do fun things like turn clouds to butts, transcode MPEG to GIF, but most importantly, they can be combined with service workers to become the fastest way to serve content. Streams, huh! What are they g
Node.jsが多数のイベントの非同期な処理に長けていることはよく知られていますが、それが単一のスレッドで行われていることを多くの人は知りません。Node.jsは実際にはマルチスレッドではないので、リクエストは全て単一スレッドのイベントループで処理されているだけなのです。 そこで、Node.jsクラスタを使って、クワッドコアプロセッサの能力を最大限に引き出しましょう。コードの複数のインスタンスで起動し、さらに多くのリクエストを処理します。少し難しく思えるかも知れませんが、Node.js v0.8で導入された cluster モジュールを使えば、実はとても簡単です。 もちろん、これは、作業を別々のプロセスに分割することのできるアプリならどんなアプリにでも役立ちますが、webサイトのような多くのIOリクエストを処理するアプリには特に重要です。 残念ながら、並行処理は複雑なので、サーバ上でのアプ
As of r195562, WebKit’s FTL JIT (Faster Than Light Just In Time compiler) now uses a new backend on OS X. The Bare Bones Backend, or B3 for short, replaces LLVM as the low-level optimizer in the FTL JIT. While LLVM is an excellent optimizer, it isn’t specifically designed for the optimization challenges of dynamic languages like JavaScript. We felt that we could get a bigger speed-up if we combine
運用しているサービスの利用画面がこんなんだった。 そんなわけで、前から試そうと思っていた極小の画像にCSSのfilterを適用し、大きな画像が読み終えたら差し替える手法を適用した。 遅延読み込み用のぼやけた画像 - Weblog - Hail2u.net The “Blur Up” Technique for Loading Background Images | CSS-Tricks filterの使い方の説明はコードと結果画面が一緒にまとめられているこの記事が分かり易い。 filter | CSS-Tricks 実装画像の読み込みが終わったタイミングで画像の差し替えおよびfilter効果の切り替えを行います。 app.jade .item__image(from-img-src='data/thumbnails/{{item.thumbnailFileName}}', to-img-s
前回のCognitoのAWS側の設定に続いて、今回はWebコンテンツ側でCognito認証を利用する際のJavascript SDKを用いた実装方法について確認する。AWS Javascript SDKを用いたCognitoの認証はサーバ側にスクリプトを用意する必要がなく、S3などを用いて安価にWebサーバを構築することが可能である。 Class: AWS.CognitoIdentityCredentials – AWS SDK for Javascript なお、AWSの認証情報とパブリックログインプロバイダから取得したトークンは、一定期間後に認証切れとなる。Cognitoはトークンの再取得についての機能は提供していないが、多くのパブリックログインプロバイダはリフレッシュトークンを用いたトークンの再取得をサポートしている。 Javascriptによる実装 AWS Javascript S
'use strict'; // nightmare const Nightmare = require('nightmare'); const path = require('path'); const TEST_HTML_PATH = "file://" + path.join(__dirname, "test.html"); // create global.browser = null; let startBrowser = function * (){ global.browser = Nightmare({ show: false, nodeIntegration: true }); yield browser .goto(TEST_HTML_PATH) .wait('body') .evaluate(() => { require("babel-register"); //
Published 12 Feb, 2016 under Release Notes ESLint v2.0.0 released We just pushed ESLint v2.0.0, which is the second major release of ESLint. When ESLint began in 2013, we had no idea just how big it would grow. This release is the result of years of feedback, development, and planning to get ESLint to be even better for our users. In this announcement, we are including all changes from each of the
Firebase とは リアルタイム通信ができたりするものらしいです。 この文章を書いてる段階では、まだ使っていません。 https://www.firebase.com/ まずログイン サインアップしてない人はサインアップ ログインしたら、Dashboardが自動で表示されました。 APP を追加する 追加こんな感じになります 簡易チャットを作る http://lite.runstant.com/ runstant 等のブラウザ上でJSを編集してすぐに実行できるサービスを使います。 今回はrunstantを使用します。 完成形はこんな感じです。 HTMLコード <script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script> でFirebaseのライブラリを読み込むだけで準備完了です。 <!docty
Latest stable release: 3.9.4 'Berlin' - Hands-on web development book: React to Python, how to create React applications with Transcrypt Clear standard syntax Transcrypt has exactly the same clear, powerful syntax that Python is famous for, without the need for any proprietary extensions. It supports string slicing with [i:j:k], matrix and vector operations with +, -, *, / and more, out of the box
場所 ギッハブにあります。 github.com 作った動機 Fluxフレームワーク、色々出てきては消えるしReduxとかが提唱されるしでもうわけわかめ。これからアタシ(のプロジェクト)、一体どーなっちゃうの〜〜?! APIリファレンスみて色々と見比べてるだけの中途半端な知識だと、いざ自分が選んだフレームワークが死んだ時に潰しが利かない…… -> じゃあ一度自分で作ってみよう! あと社内にFluxわかるマンがいなかったので、公開して広く世間の意見を求めたいという気持ちも強かった。なんかおかしいところあったら教えてくだされ〜〜〜 というわけで作った。 あとES6で書いたコードをnpmモジュールで公開する方法を知りたかったというのもある。 大変だったところ Fluxを実際に実装に落とし込める感じに理解するのが大変だった。 理解するために、Facebookの概念図をみたり、azu氏の実装(Git
audience: who is this book for how to read this book special thanks technical editor the author what this book is about what this book is not debug comments operators parenthesis brackets references variables constants types invoke function declaration VS function expression named function expressions scope private and nested scope context global context method context invoking a function via call
SpiritThe ultimate tool to create high-quality animations directly in the browser. Important Notice: I want to extend my deepest gratitude to everyone who has supported Spirit over the years. After careful consideration, I have made the difficult decision to discontinue Spirit as a service. Read more ...
最近、今まで色々と書いてきてた WebフロントエンドUIの 各モジュールファイルをあらかた書き換えた。別に機能を増やしたりしたわけでないんだけど、最近の JS のモジュール化の動きで今までの方針でもモダン(って良い方があってるかどうかは知らんけど)な方針も使えるように変更したので、その経緯とか結果とかを残しておこうと思った次第です。 今までの書き方は基本的にプロジェクト毎にユニークなグローバルのオブジェクトを作ってそこに各UIのオブジェクトをプロパティとして生やしていくという多分それなりにスタンダードだった方針を取ってた。 これがここ数年でガラッと変わったのでそこら辺についてまず。 JavaScriptにはモジュール化の仕組みがない そもそも、JavaScriptにはコードをモジュール化してそれを必要な際に呼び出して使用するような仕組みが言語仕様として存在しない。 よほど小さいプログラムで
ESLint のルールに eslint-config-airbnb v5.0 を採用してみたけど、一部のルールが厳しかったという話です。 eslint-config-airbnb の設定 おそらく、一番デフォルトの全部入りの設定 Our default export contains all of our ESLint rules, including EcmaScript 6+ and React. It requires eslint and eslint-plugin-react. npm install --save-dev eslint-config-airbnb eslint-plugin-react eslint add "extends": "airbnb" to your .eslintrc no-param-reassign http://eslint.org/docs
Stage -1 Draft / February 9, 2016 Array.prototype.flatMap & Array.prototype.flatten Introduction # Array.prototype.flatten returns a new array that is one dimensional with all sub-array elements concatted into it recursively. Array.prototype.flatMap first maps each element using a mapping function, then flattens the result into a new array. It is identical to a map followed by a flatten, but flatM
kyotojs.doorkeeper.jp 2016-02-03、はてな京都オフィスにて Kyoto.js #9 を開催しました。 来場者、登壇者の皆様ありがとうございました!!! 経緯 京都では技術イベントが少ない。 聞くと、京都では数年前まで Kyoto.js というイベントが開催されていたらしい。 それなりに続いてはいて、Kyoto.なんか みたいな番外編もやっていたのが、なんとなく忙しくてやらなくなってしまった模様。 12月に社内でJSの話をしていた時、Kyoto.js運営やりませんか的な話を振られたので、勿論、やりましょうとなったのだった。 発表 一人目:「IonicFrameworkと何かと何か(仮)」 by @kamiyam Sails + Ionicでアプリやってる話。 Sailsはともかく、IonicとかAngularJSのウケがよくて、質問タイムは大盛り上がりだった。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く