Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Yoshiori SHOJI yoshiori

🏠
Working from home
View GitHub Profile
@yoshiori
yoshiori / nature-remo.1m.rb
Created Dec 21, 2020
不快指数だすやつ
View nature-remo.1m.rb
#!/usr/bin/env ruby
require "uri"
require "net/http"
require "json"
token = "xxxx" # https://home.nature.global/
uri = URI.parse("https://api.nature.global/1/devices")
http = Net::HTTP.new(uri.host, uri.port)
@yoshiori
yoshiori / ignore
Created Jun 8, 2020
.config/git/ignore
View ignore
# Mac
.DS_Store
.AppleDouble
.LSOverride
Icon
# IntelliJ
.idea/
**/*.iml
View hoge.md

この修正を入れる前の実装で中身見てみた。元の hourly の実装時の数値

[1] pry(#<RSpec::ExampleGroups::DailyGoalAllocatorImpression::Allocate::WhenCampaignPeriodStartIsNotMidnight>)> daily_goals.map{|g| g.allocated }
=> [41153, 165536, 149422, 133308, 117194, 101080, 84966, 68852]
[2] pry(#<RSpec::ExampleGroups::DailyGoalAllocatorImpression::Allocate::WhenCampaignPeriodStartIsNotMidnight>)> reference_time
=> Thu, 24 Oct 2019 10:00:00 JST +09:00

時間が 10 時だから初日の allocate が一番少なくなっているように見えるようになっているだけに見えるので調査

View peco_select_repository.fish
function peco_select_repository
if test (count $argv) = 0
set peco_flags --layout=bottom-up
else
set peco_flags --layout=bottom-up --query "$argv"
end
ghq list -p | peco $peco_flags | read line
if [ $line ]
View hoge_spec.rb
def foo(str)
result = str.scan(/(\*|\+|&|\||\d+)/).flatten
while result.size != 1
result = hoge(result)
end
result.first
end
def hoge(ary)
%w(| & + *).each do |op|
View apm list
/Users/yoshiori-shoji/.atom/packages (28)
├── atom-rails@0.3.4
├── auto-update-packages@0.2.2
├── autocomplete-plus@1.1.0
├── autocomplete-snippets@0.3.2
├── dash@1.0.0
├── editor-stats@0.16.0
├── file-icons@1.4.4
├── gist-it@0.5.0
├── git-grep@0.7.0
View gist:b4ebd62042180ec3ee97
 ∧_∧
⊂(#・ω・)  ご家庭に Opera はない!
 /   ノ∪
 し―-J |l| |
         人ペシッ!!
       __
       \  \
          ̄ ̄
View kawasaki.txt
Java のコードを
pythonista に持ち込む:まぁ、Java も書けなくはないけどね
rubyist に持ち込む:ツマラン、どこかに細工してやろうか・・・
perler に持ち込む:出てけゴルァァァァァァァァァァァ!!
Python のコードを
Java エンジニアに持ち込む:おぅ、Python のコードか
rubyist に持ち込む:スクリプト言語の僚友だ、バッチリ直してやるぜ
perler に持ち込む:けっ、優等生か