- Hubot であそぼう
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
if ('NodeList' in window && !NodeList.prototype.forEach) { | |
console.info('polyfill for IE11'); | |
NodeList.prototype.forEach = function (callback, thisArg) { | |
thisArg = thisArg || window; | |
for (var i = 0; i < this.length; i++) { | |
callback.call(thisArg, this[i], i, this); | |
} | |
}; | |
} |
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
// sRGB GAMMA CORRECTION, per spec: https://en.wikipedia.org/wiki/SRGB | |
@function re-gamma($n) { @if $n <= 0.0031308 { @return $n * 12.92; } @else { @return 1.055 * pow($n,1/2.4) - 0.055; } } | |
@function de-gamma($n) { @if $n <= 0.04045 { @return $n / 12.92; } @else { @return pow((($n + 0.055)/1.055),2.4); } } | |
// sRGB BT-709 BRIGHTNESS | |
@function brightness($c) { | |
$rlin: de-gamma(red($c)/255); | |
$glin: de-gamma(green($c)/255); | |
$blin: de-gamma(blue($c)/255); | |
@return re-gamma(0.2126 * $rlin + 0.7152 * $glin + 0.0722 * $blin) * 100; |
パッケージ(Package)はAtomのコアです。エディターのメイン機能以外のほぼすべては、パッケージによって扱われます。これには、ファイルツリー、ステータスバー、シンタックスハイライトのような「コア」の部分が含まれています。
PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
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
# This is a snippet to add to middleman's config.ru file if you want to add basic auth to your middleman app on heroku | |
# NOTE: you need to stick this above the build script like shown below | |
use Rack::Auth::Basic, "Restricted Area" do |username, password| | |
[username, password] == ['username', 'password'] | |
end | |
# This part below is just what builds the static site. you only need to add lines 4 - 6 above any build command like shown below. | |
use Rack::TryStatic, :root => "build", :urls => %w[/], :try => ['.html', 'index.html', '/index.html'] |
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
みなさまRubyKaigiお疲れ様でしたー。素敵なKaigiに再会できてうれしかったです。 | |
RubyKaigiまわりで、同じ分野の問題提起が二つありましたねぇ。 | |
一つはKaigi中での、「台湾の女の子はKawaii、だからRubyKaigi Taiwanに来るべき」という発言、 | |
それを笑いで迎えた場内に対して、女性への配慮が足りないだろうという意見。 | |
https://gist.github.com/kyanny/5694201 | |
もう一つは、続くRubyHirobaでの、ポルノに関しての情報処理技術についてのLTがあったこと。 | |
(そして、実際にそれを聞いて傷ついた女性が存在し、問題が提起されました) | |
RubyhirobaはRubyKaigiとは独立した、せっかく東京にRubyistがたくさん居るんだから交流しよう!という、 | |
LTとWorkshopと交流の場を提供するイベントです。 |
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
/* | |
* Calculate Luma | |
* | |
* Luma measures a colors percieved brightness | |
* by the human eye. | |
* http://en.wikipedia.org/wiki/YIQ | |
*/ | |
@function luma($color){ |
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 'active_support/concern' | |
module FrontMatter | |
extend ActiveSupport::Concern | |
included do | |
helper_method :front_matter | |
end | |
def front_matter |
NewerOlder