Skip to content

Instantly share code, notes, and snippets.

View yoshiori's full-sized avatar
🏠
Working from home

Yoshiori Shoji yoshiori

🏠
Working from home
View GitHub Profile
public enum Hoge implements Runnable{
FOO("foo"){
@Override
public void run() {
// 何か処理
}
@Override
public String getAddress() {
@yoshiori
yoshiori / nature-remo.1m.rb
Created December 21, 2020 11:01
不快指数だすやつ
#!/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 June 8, 2020 11:05
.config/git/ignore
# Mac
.DS_Store
.AppleDouble
.LSOverride
Icon
# IntelliJ
.idea/
**/*.iml

この修正を入れる前の実装で中身見てみた。元の 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 が一番少なくなっているように見えるようになっているだけに見えるので調査

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 ]
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|
@yoshiori
yoshiori / apm list
Created January 6, 2015 05:57
apm list
/Users/yoshiori-shoji/.atom/packages (28)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
 ∧_∧
⊂(#・ω・)  ご家庭に Opera はない!
 /   ノ∪
 し―-J |l| |
         人ペシッ!!
       __
       \  \
          ̄ ̄