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
480
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
27k
データベース/SQL超入門!完全初心者向けに世界一分かりやすく解説します
ttskch
1
4.2k
Symfony UX Autocompleteとかいう 顧客が本当に必要だったもの
ttskch
0
1.7k
就活生あるいは新人エンジニアさんへのお節介なアドバイス
ttskch
0
1.5k
symfony/pantherでWordleを解いてみた
ttskch
0
250
ついに、Webアプリでの帳票印刷のベストプラクティスを編み出しました💡
ttskch
16
19k
phpenvやめました🤦♂️
ttskch
0
1.2k
PHPでCSVのインポート/エクスポートに立ち向かう
ttskch
1
2.1k
phpenv on Mac 難しすぎワロタ
ttskch
0
540
Other Decks in Programming
See All in Programming
sqlcを利用してsqlに型付けを
kamiyam
0
230
Infrastructure as Code でセキュリティを楽にしよう!
konokenj
5
1.4k
標準ライブラリの動向とイテレータのパフォーマンス
makki_d
3
190
CSC509 Lecture 02
javiergs
PRO
0
160
What is TDD?
urakawa_jinsei
1
200
Pydantic x Database API:turu-pyの開発
yassun7010
1
430
VS Code extension: ドラッグ&ドロップでファイルを並び替える
ttrace
0
150
為醫療加裝Python的引擎
cclai999
0
270
NANIMACHI
naokiito
0
930
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
220
M5Stack に色々な M5ユニットをつないで扱う為の新たなアプローチ
gob
0
200
型付きで行うVSCode拡張機能開発 / VSCode Meetup #31
mazrean
0
220
Featured
See All Featured
Statistics for Hackers
jakevdp
796
220k
Fashionably flexible responsive web design (full day workshop)
malarkey
403
65k
Practical Orchestrator
shlominoach
185
10k
Music & Morning Musume
bryan
46
6.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
7
560
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
Become a Pro
speakerdeck
PRO
24
4.9k
The Mythical Team-Month
searls
218
43k
KATA
mclloyd
27
13k
Why Our Code Smells
bkeepers
PRO
334
57k
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 :)