Skip to content

Instantly share code, notes, and snippets.

select *
from (
select query_expansion.keyword as original_query
, search_sessions.query as guided_query
, query_expansion.rank as guide_rank
, users.name as author_name
, recipes.id as recipe_id
, recipes.title as recipe_title
, recipes.published_at as published_at
, count(distinct comments.user_id) as cooksnappers
bx rubocop
Error: unrecognized cop Layout/SpaceAroundMethodCallOperator found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Lint/RaiseException found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Lint/StructNewOverride found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Style/ExponentialNotation found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Style/HashEachMethods found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Style/HashTransformKeys found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-guides-master--rubocop-ruby-yml, unrecognized cop Style/HashTransformValues found in .rubocop-https---raw-githubusercontent-com-cookpad-global-style-
@shin1ohno
shin1ohno / ayam_co_search.sql
Created March 27, 2020 08:22
ayam indonesia
select items.display_name,
pairings.display_name as paring_name,
stats.ksi,
stats.ksv,
stats.kmr,
stats.kci,
stats.kcsv,
stats.kcmr
from tabemiru.monthly_combination_stats stats
Started GET "/category/2096" for ::1 at 2020-03-12 10:16:20 +0900
Processing by CategoryController#show as HTML
Parameters: {"id"=>"2096"}
Cache read: main+search_categories
REUSE CACHE: SELECT `search_categories`.* FROM `search_categories` WHERE `search_categories`.`id` = 2096 LIMIT 1 /* app/controllers/category_controller.rb:359 `init_ad_flag` */
Cache read: category_controller_init_category_variables_ids-2096 ({:expires_in=>600 seconds, :store=>:memcache})
Cache generate: category_controller_init_category_variables_ids-2096 ({:expires_in=>600 seconds, :store=>:memcache})
Cache read: main+search_categories
REUSE CACHE: SELECT `search_categories`.* FROM `search_categories` WHERE `search_categories`.`id` = 2096 LIMIT 1 /* app/controllers/category_controller.rb:322 `block in category_variables_with_cache` */
Cache read: myfolder_category_cache/3 ({:expires_in=>21600 seconds})
<div class='halo_unit'>
<div class="photos two">
<div class="flip_frame" id="helo_frame">
<div class="tenant photo flip">
<img alt="" src="f858aa44eddaf08f72354409bca7ac9d.jpg">
</div>
<div class="vegetable_set photo flip">
<img alt="" src="bec0812cd17eb787240ac23ce76b986d.jpg">
</div>
</div>
@shin1ohno
shin1ohno / rt_1_2.md
Created March 16, 2013 03:36
ruby tutorial

first ruby tutrial

day 1: set up environment

  • install XCode: search 'xcode' in app store and install
  • install 'command line tools': after XCode installed in XCode, install from it's preference pane
  • install home brew: open up terminal, and type ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  • install rbenv: open up terminal, and type brew install rbenv
  • as said, echo 'eval "$(rbenv init -)"' >> .bashrc', then close terminal window and open again
  • install ruby-build: in the terminal, and type brew install ruby-build
@shin1ohno
shin1ohno / Gemfile
Created June 28, 2012 12:17
とにかくmasterを追うGemfile
source 'https://rubygems.org'
gem 'rails', git: 'https://github.com/rails/rails.git', branch: '3-2-stable'
gem 'rack', '~> 1.4.0', git: 'https://github.com/rack/rack.git'
gem 'haml-rails', git: 'https://github.com/indirect/haml-rails.git'
gem 'omniauth', git: 'https://github.com/intridea/omniauth.git'
gem 'omniauth-facebook', git: 'https://github.com/mkdynamic/omniauth-facebook.git'
gem 'amazon-ecs', git: 'https://github.com/bmthykm/amazon-ecs.git'
gem 'capistrano', git: 'https://github.com/capistrano/capistrano.git'
gem 'jquery-rails', git: 'https://github.com/rails/jquery-rails.git'
@shin1ohno
shin1ohno / gist:2841546
Created May 31, 2012 06:52
ウェブページをまるごとキャプチャする
# coding: utf-8
# !/usr/bin/env ruby
require 'rubygems'
require 'capybara-webkit'
filename = ARGV[0].to_s.gsub("http", "").gsub("://","").gsub(/[\. [\/ \:]]/, "_") + ".png"
p "printing... #{filename}"
driver = Capybara::Driver::Webkit.new 'web_capture'
driver.visit ARGV[0].to_s
@shin1ohno
shin1ohno / Gemfile
Created April 2, 2012 16:54
なんとなくよく使うGemfile
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'haml-rails'
gem 'paperclip'
gem 'omniauth'
gem 'omniauth-facebook'
gem 'unicorn'
gem 'capistrano'
gem 'simple_form'