Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Sheetsu
Search
Takashi Kanemoto
August 27, 2017
Programming
0
490
Sheetsu
Symfony Meetup #17 LT 資料
https://symfony.connpass.com/event/63659/
Takashi Kanemoto
August 27, 2017
Tweet
Share
More Decks by Takashi Kanemoto
See All by Takashi Kanemoto
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
47
29k
データベース/SQL超入門!完全初心者向けに世界一分かりやすく解説します
ttskch
1
4.5k
Symfony UX Autocompleteとかいう 顧客が本当に必要だったもの
ttskch
0
1.8k
就活生あるいは新人エンジニアさんへのお節介なアドバイス
ttskch
0
1.5k
symfony/pantherでWordleを解いてみた
ttskch
0
270
ついに、Webアプリでの帳票印刷のベストプラクティスを編み出しました💡
ttskch
16
19k
phpenvやめました🤦♂️
ttskch
0
1.3k
PHPでCSVのインポート/エクスポートに立ち向かう
ttskch
1
2.2k
phpenv on Mac 難しすぎワロタ
ttskch
0
560
Other Decks in Programming
See All in Programming
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Quine, Polyglot, 良いコード
qnighy
4
640
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
CSC509 Lecture 09
javiergs
PRO
0
140
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
役立つログに取り組もう
irof
28
9.6k
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Featured
See All Featured
How GitHub (no longer) Works
holman
310
140k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Language of Interfaces
destraynor
154
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
GitHub's CSS Performance
jonrohan
1030
460k
A designer walks into a library…
pauljervisheath
203
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Thoughts on Productivity
jonyablonski
67
4.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A Philosophy of Restraint
colly
203
16k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Transcript
Sheetsu #symfony_meetup 2017.08.27 @ttskch
@ttskchʢ͖ͨͭͪʣ • ໊ݹ͔Βདྷ·ͨ͠ • ΧϧςοτίϛϡχέʔγϣϯζCTO • PHPྺ5.5ɺSymfonyྺ3ʢROMઐʣ • গ͚͓ͩ͠ख͍͠·ͨ͠
Χϧςοτίϛϡχέʔγϣϯζ • ઈࢍPHPerେืूதʂ • ϦεςΟϯάࠂӡ༻πʔϧʮLisketʯΛఏڙ • ࣌ΛઌऔΔϗϫΠτاۀͰ͢
ΤϯδχΞͷಇ͖͢͞େࣄʹͯ͠·͢ Χϧςοτίϛϡχέʔγϣϯζ
SNS͔ϝʔϧͰ͓ؾܰʹ͝࿈བྷ͍ͩ͘͞✨ Χϧςοτίϛϡχέʔγϣϯζ
Sheetsu #symfony_meetup 2017.08.27 @ttskch
sheetsu.com
sheetsu.com
sheetsu.com
sheetsu.com
sheetsu.com
$client = new \GuzzleHttp\Client(); $client ->post('https://sheetsu.com/apis/v1.0/xxxxxxxxxxxx', [ 'json' => [
'id' => 6, 'name' => 'ttskch', 'score' => 100, ], ]); sheetsu.com
sheetsu.com
ʘศརʂʂʂʗ
ͱ͜Ζ͕͋Δ
402 Payment Required
͑ͬ
None
͑ͬ
None
ͳΜ͔ແྉϓϥϯ͕ ͠Εͬͱͳ͘ͳͬͯͨ ʘ(^o^)ʗ
ͱ͍͏Θ͚Ͱ
ttskch/pheetsu
ͷɺΛ͔ͨͬͨ͠ͷͰ͕͢
ͷɺΛ͔ͨͬͨ͠ͷͰ͕͢
ͷɺΛ͔ͨͬͨ͠ͷͰ͕͢
ؒʹ߹͍·ͤΜͰͨ͠ ʘ(^o^)ʗ
$pheetsu = \Ttskch\Pheetsu\Factory\PheetsuFactory::create( 'google_oauth2_client_id', 'google_oauth2_client_secret', 'google_oauth2_redirect_uri', 'google_oauth2_javascript_origin', 'spreadsheet_id', 'sheet_name' );
$pheetsu->authenticate(); $pheetsu->create([ 'id' => 6, 'name' => 'ttskch', 'score' => 100, ]); Usageʢ༧ఆʣ
σϞಈ͖·͢ʂʢreadͷΈʣ https://github.com/ttskch/pheetsu/tree/master/demo
ͨ͠Β ͬͯΈ͍ͯͩ͘͞
͓·͚
ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠ • ྫɿ3→Cɺ30→AD • ͍͍ɺ26ਐͶ • ͭ
$base26 = base_convert($number, 10, 26); $from = '0123456789abcdefghijklmnop'; $to =
'0ABCDEFGHIJKLMNOPQRSTUVWXY'; $name = ''; foreach (str_split($base26) as $digit) { $digit = substr($to, strpos($from, $digit), 1); $name .= $digit; } echo $name . PHP_EOL; ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$number = 3; // -> C ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$number = 3; // -> C $number = 30; //
-> AD ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$number = 3; // -> C $number = 30; //
-> AD $number = 26; // -> A0 ͑ͬ ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$number = 3; // -> C $number = 30; //
-> AD $number = 26; // -> A0 ͑ͬ // Z ʹͳͬͯ΄͔ͬͨ͠ͷʹ… ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$from = '0123456789abcdefghijklmnop'; $to = '0ABCDEFGHIJKLMNOPQRSTUVWXY'; ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
$from = '0123456789abcdefghijklmnop'; $to = '0ABCDEFGHIJKLMNOPQRSTUVWXY'; ͋ͬɾɾɾʢ͠ʣ ྻ൪߸ˠྻ໊ͷม͕ҙ֎ͱ͔ͬͨ͠
Α͔ͬͨΒ಄ͷମૢʹ ղ͍ͯΈ͍ͯͩ͘͞
࣮ྫ https://github.com/ttskch/pheetsu/blob/ master/src/Service/ColumnNameResolver.php ͬͱΤϨΨϯτͳղ๏͋ͬͨΒڭ͍͑ͯͩ͘͞
Thanks :)