Skip to content

Instantly share code, notes, and snippets.

View juno's full-sized avatar
💰
writing code (almost) every weekday

Junya Ogura juno

💰
writing code (almost) every weekday
View GitHub Profile
@juno
juno / test.rb
Last active January 4, 2018 04:40
Test case for "bad value for range" error in activerecord 5.2.0.beta2 with PostgreSQL RANGE type. https://github.com/rails/rails/issues/31612
# frozen_string_literal: true
PG_DATABASE_NAME = "test_ar_range"
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
@juno
juno / system_test_driven_by_headless_chrome.rb
Created November 13, 2017 12:39
Rails 5.1 System Test driven by headless chrome.
driven_by(
:selenium,
using: :chrome,
screen_size: [1400, 900],
options: {
desired_capabilities: {
chromeOptions: {
args: %w[headless disable-gpu],
prefs: {
'modifyheaders.headers.name' => 'Accept-Language',
@juno
juno / qiita_slide_preview_scrollbar.css
Created September 13, 2017 16:01
Always show scrollbar in Qiita's slide preview area while using Chrome/Safari on Mac.
.slide_preview::-webkit-scrollbar {
background: #eee;
width: 7px;
}
.slide_preview::-webkit-scrollbar-button {
background: #666;
height: 5px;
width: 5px;
}
.slide_preview::-webkit-scrollbar-piece {
@juno
juno / rice.ja.md
Created April 21, 2017 07:41
Summary of Intercom's RICE: Simple prioritization for product managers (in Japanese).

RICE

RICE: Simple prioritization for product managers - Inside Intercom https://blog.intercom.com/rice-simple-prioritization-for-product-managers/

  • Reach (指定期間内で何人が影響を受けるか)
    • その機能に触れる・利用するユーザー数
    • できるだけ現実的な数字をとる
  • Impact (一人ひとりにどれくらい影響を及ぼすか)
  • 3(とても高い)/2(高い)/1(普通)/0.5(低い)/0.25(最小)
  • It’s a golden age for rich, meaningful markup.
  • We nest div inside div inside div, and we give every div a stack of classes—but when we look in the CSS, our classes provide little insight into what we’re actually trying to define.

Clearing a few things up

  • We write and without a moment’s hesitation. Looking at Github, one can find plenty of examples of . But why? You can’t have more than one main element, so you already know how to reference it directly.
  • We have no excuse for not expecting our fellow developers to know and understand them.
  • An end-user may not notice or care if you stick a form class on your form element, but you should. You should care about bloating your markup and slowing down the user experience. You should care about readability.
  • Start semantic

@juno
juno / my-favorite-nice-small-companies.md
Last active October 17, 2023 09:42
My favorite ( small business | profitable | bootstrapped ) companies. 💕
  • Basecamp
    • Founded: 1999
    • Location: Chicago and remote
    • Team: ~50
    • Customers: Over 100,000 companies
    • Wikipedia
  • Aetrion LLC.
    • Founded: 2010
    • Team: 12
  • Product: DNSimple
@juno
juno / foursquare-place-ratings.md
Created April 5, 2016 10:54
Memo for Foursquare's place ratings.

Foursquare place ratings

FoursquraeのVenueには10段階のRating(評価)が設定され、評価はいくつかのシグナルをもとに算出される。 ソーシャルなデータから抽出された以下のようなものがシグナルとして用いられる。

  • Likes / Dislikes
  • Positive Tips / Negative Tips
  • ロイヤルカスタマーを多く抱えているかどうか
  • VenueをLikeしたユーザーの信頼度や専門性など
@juno
juno / atom-setup.md
Last active March 12, 2023 21:07
My Atom editor setup.

My Atom editor setup

Atom

Atom Shell Commands

  • Launch Atom and select "Atom - Install Shell Commands" menu to install atom and apm commands
  • Add /usr/local/bin to PATH environment varibale