This file contains hidden or 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
| module.exports = { | |
| _path(basePath, filePath) { | |
| let splitDir = __dirname.split("/"); | |
| splitDir.shift(); | |
| let appRootIndex; | |
| splitDir.map((dir, i) => { | |
| if (dir === "spec") { | |
| appRootIndex = i; | |
| } |
This file contains hidden or 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
| import React, { createElement } from "react"; | |
| import { render } from "react-dom"; | |
| import { Provider, connect } from "react-redux"; | |
| import { createStore, applyMiddleware } from "redux"; | |
| import thunk from "redux-thunk"; | |
| import createLogger from "redux-logger"; | |
| import camelCase from "lodash/camelCase"; | |
| import parseJSON from "./parse-json"; |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <rss | |
| xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
| xmlns:itunes="http://www.itunes.com/DTDs/Podcast-1.0.dtd" | |
| xmlns:media="http://search.yahoo.com/mrss" | |
| version="2.0"> | |
| <channel> | |
| <ttl>60</ttl> |
This file contains hidden or 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
| {"responseData": {"feed":{"feedUrl":"http://feeds.rebuild.fm/rebuildfm","title":"Rebuild","link":"http://rebuild.fm","author":"","description":"ウェブ開発、プログラミング、モバイル、ガジェットなどにフォーカスしたテクノロジー系ポッドキャストです。","type":"rss20","entries":[{"title":"Aftershow 143: There May Be A Fire (takoratta, N)","link":"http://rebuild.fm/143a/","author":"Tatsuhiko Miyagawa","publishedDate":"Thu, 26 May 2016 00:00:00 -0700","contentSnippet":"及川卓也さん、Naoki Hiroshima さんと、iPhone, DEC Alpha, ウェブ、 Maker Faire, 電王戦などについて話しました。\nShow Notes\nRebuild: Aftershow 136: Googling ...","content":"\u003cp\u003e及川卓也さん、Naoki Hiroshima さんと、iPhone, DEC Alpha, ウェブ、 Maker Faire, 電王戦などについて話しました。\u003c/p\u003e\n\u003ch3\u003eShow Notes\u003c/h3\u003e\u003cul\u003e\n\u003cli\u003e\u003ca href\u003d\"http://rebuild.fm/136a/\"\u003eRebuild: Aftershow 136: Googling with Bing (takoratta)\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href\u003d\"https://ja.wikipedia.org/wiki/DIGITAL_HiNote\"\u003eDIGITAL HiNote\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca h |
This file contains hidden or 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 React = require("react"); | |
| module.exports = React.createClass({ | |
| displayName: "hoge", | |
| createOnChangeHandler(item) { | |
| return (e) => { | |
| console.log("this is " + item.name); | |
| }; | |
| }, |
This file contains hidden or 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
| # initialiser/pantryman.rb | |
| Pantryman::Configure do | |
| garage analytics: { | |
| endpoint: Rails.applicatino.secrets.analytics_garage_endpoint, | |
| access_token: Rails.application.secrets.anatoken | |
| } | |
| end | |
| # app/models/ranking.rb |
This file contains hidden or 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
| jQuery.eventMapping = (object) -> | |
| jQuery.each object.events, (event_and_selector, handler_name) -> | |
| [event, selector_with_elem_name] = event_and_selector.split(' ') | |
| [selector, elem_name] = selector_with_elem_name.split('|') | |
| object.$el.on(event, selector, jQuery.proxy(object[handler_name], object)) | |
| if elem_name? then object[elem_name] = object.$el.find(selector) |
This file contains hidden or 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
| SELECT products.name, MIN(skus.price), MAX(skus.price), MIN(skus.promotion_price), MAX(skus.promotion_price), skus.promotion_price_started_at, skus.promotion_price_ended_at | |
| FROM products | |
| INNER JOIN skus ON products.id = skus.product_id | |
| GROUP BY skus.product_id | |
| HAVING ( | |
| CASE WHEN MIN(skus.promotion_price) IS NOT NULL | |
| AND skus.promotion_price_started_at <= NOW() | |
| AND skus.promotion_price_ended_at >= NOW() | |
| THEN | |
| MIN(skus.promotion_price) |
This file contains hidden or 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
| jQuery.fn.brightness = function() { | |
| var bg_color, rgba, y; | |
| bg_color = this.css('background-color'); | |
| if ((bg_color != null) && bg_color.length) { | |
| rgba = bg_color.match(/^rgb(?:a)?\(([0-9]{1,3}),\s([0-9]{1,3}),\s([0-9]{1,3})(?:,\s)?([0-9]{1,3})?\)$/); | |
| if (rgba != null) { | |
| if (rgba[4] === '0') { | |
| if (this.parent().length) return this.parent().brightness(); | |
| } else { | |
| y = 2.99 * rgba[1] + 5.87 * rgba[2] + 1.14 * rgba[3]; |
This file contains hidden or 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
| = render_cell :sidebar, :show | |
| #main | |
| article | |
| %h1= @article.title | |
| %div= @article.body |