SlideShare a Scribd company logo
Tokyo Rails Meetup #36
July 24th, 2017
19:00 - Doors Open
19:30 - Semi-automated bank transfers with Rails and
Shinsei - David Stosik
20:10 - Drinks, food, and networking
20:40 - Project Show and Tell
21:20 - Wrapping up
22:00 - Doors Close
Semi-Automating Bank
Transfers
With Rails and ShinseiBank-Ruby
David Stosik
Who am I?
David Stosik
@davidstosik
Engineer @ Cookpad
Global Team
Rails developer
French
In Japan since 2010
Video game fan
Disclaimers 🙏🏻
• 👶🏻 First talk
• ⏱ Last-minute prepared
• 🐞 Bugs are expected
• ⚠️ No responsibility
• ❓ Questions
shinseibank-ruby 🏦
• https://github.com/binzume/shinseib
ank-ruby
• December 2013 ~ July 2015
• Still works (!)
• Single file, 758 lines
Fork
• https://github.com/knshiro/shinseibank-ruby
• With @knshiro : Ugo Bataillard
• From need to automate operations (transfers,
accounting)
• Now a gem
• Provides CLI with Thor
• Active development: contributions are welcome!
Thor ⚡️
• https://github.com/erikhuda/thor
• Toolkit for building powerful command-line interfaces
• In shinseibank-ruby, allowed us to create a CLI to
perform common operations
envchain 🔑
• https://github.com/sorah/envchain
• By @sorah, Cookpad developer
• Securely stores secrets (Mac OS X: Keychain, Linux: Gnome’s
Keyring)
• Dynamically retrieves secrets and sets them as environment
variables
• Avoids storing secrets in clear text files
Difficulties
• Encoding:
• Shinsei’s Internet banking does not accept UTF-8
• String#toutf8:
This method decode MIME encoded string and convert
halfwidth katakana to fullwidth katakana. If you don't want it,
use
NKF.nkf('-wxm0', str) 🏻🏻♂️ ???
https://ruby-doc.org/stdlib-1.8.6/libdoc/nkf/rdoc/String.html#method-i-toutf8
• Testing
Goal 🎯
• Automate monthly rent transfer
• Open to evolutions
• Avoid issuing multiple transfers
• Security
• Keep last step manual
Solution
• Daily task checks if new transfer needs to be issued
• On new transfer:
• Create a transfer record with all details
• Send by email a one-time link that executes the transfer
• (Almost) No UI!
• https://github.com/davidstosik/auto_transfer
One-time links
Using Rails 5’s has_secure_token
Scheduling
Using the ice_cube gem
ice_cube ❄️
• https://github.com/seejohnrun/ice_cube
• Modeling schedules (events, with or without recurrence
rules)
• Powerful rule system
• Serializes to YAML, can be stored in database
Just a little bit more magic ✨
• Daily task that checks
schedules to issue new
transfers
• Mailer that sends email
with one-time link
• Plain text responses for
simplicity
Conclusions ✅
• Limits:
• Only Shinsei, not modular
• Shinsei is updating their Internet
banking! 😱
• No interface to manage
schedules
• One instance per user/account
• Learned:
• shinseibank-ruby gem uses
Shinsei’s design flaws as an
API
• CLI with Thor
• Scheduling with IceCube
• Rails 5’s has_secured_token
Thank you!
Feel free to ask questions.
Tokyo Rails Meetup is recruiting speakers,
please talk with us if you would like to share
your knowledge with the community.

More Related Content

What's hot

Munchkin
MunchkinMunchkin
Munchkin
Jaewe Heo
 
Scaling Uber's Real-time Market Platform
Scaling Uber's Real-time Market PlatformScaling Uber's Real-time Market Platform
Scaling Uber's Real-time Market Platform
C4Media
 
Intro stream processing.be meetup #1
Intro stream processing.be meetup #1Intro stream processing.be meetup #1
Intro stream processing.be meetup #1
Peter Vandenabeele
 
Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018
Antonio Terreno
 
Use cases of Grails in web applications
Use cases of Grails in web applicationsUse cases of Grails in web applications
Use cases of Grails in web applications
GrailsConf
 
JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013
Ronald Northrip
 
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
camunda services GmbH
 
Serverless microservices in the wild
Serverless microservices in the wildServerless microservices in the wild
Serverless microservices in the wild
Rotem Tamir
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Quick introduction to nodeJs
Quick introduction to nodeJsQuick introduction to nodeJs
Quick introduction to nodeJs
Aram Rafeq
 
Asynchronous processing using AWS Services
Asynchronous processing using AWS ServicesAsynchronous processing using AWS Services
Asynchronous processing using AWS Services
Michael Bui
 
R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?
Olexandra Dmytrenko
 
Sail in the Cloud - An intro to Istio
Sail in the Cloud  - An intro to IstioSail in the Cloud  - An intro to Istio
Sail in the Cloud - An intro to Istio
Alex Soto
 
Public and private cloud metadata and why it is useful
Public and private cloud metadata and why it is usefulPublic and private cloud metadata and why it is useful
Public and private cloud metadata and why it is useful
DevSecCon
 
Kubernetes: The Very Hard Way
Kubernetes: The Very Hard WayKubernetes: The Very Hard Way
Kubernetes: The Very Hard Way
Rob Boll
 
Agile
AgileAgile
Agile
Ambientia
 
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
Codemotion Tel Aviv
 
Learnings,experiments,innovations
Learnings,experiments,innovationsLearnings,experiments,innovations
Learnings,experiments,innovations
Sheshadri Mantha
 
Promoter – A Python Project for Replicating a JSS via the API
Promoter – A Python Project for Replicating a JSS via the APIPromoter – A Python Project for Replicating a JSS via the API
Promoter – A Python Project for Replicating a JSS via the API
macbrained
 

What's hot (19)

Munchkin
MunchkinMunchkin
Munchkin
 
Scaling Uber's Real-time Market Platform
Scaling Uber's Real-time Market PlatformScaling Uber's Real-time Market Platform
Scaling Uber's Real-time Market Platform
 
Intro stream processing.be meetup #1
Intro stream processing.be meetup #1Intro stream processing.be meetup #1
Intro stream processing.be meetup #1
 
Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018Serverless conference-labrador-at-2018
Serverless conference-labrador-at-2018
 
Use cases of Grails in web applications
Use cases of Grails in web applicationsUse cases of Grails in web applications
Use cases of Grails in web applications
 
JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013
 
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
 
Serverless microservices in the wild
Serverless microservices in the wildServerless microservices in the wild
Serverless microservices in the wild
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
 
Quick introduction to nodeJs
Quick introduction to nodeJsQuick introduction to nodeJs
Quick introduction to nodeJs
 
Asynchronous processing using AWS Services
Asynchronous processing using AWS ServicesAsynchronous processing using AWS Services
Asynchronous processing using AWS Services
 
R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?
 
Sail in the Cloud - An intro to Istio
Sail in the Cloud  - An intro to IstioSail in the Cloud  - An intro to Istio
Sail in the Cloud - An intro to Istio
 
Public and private cloud metadata and why it is useful
Public and private cloud metadata and why it is usefulPublic and private cloud metadata and why it is useful
Public and private cloud metadata and why it is useful
 
Kubernetes: The Very Hard Way
Kubernetes: The Very Hard WayKubernetes: The Very Hard Way
Kubernetes: The Very Hard Way
 
Agile
AgileAgile
Agile
 
All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...All the reasons for choosing react js that you didn't know about - Avi Marcus...
All the reasons for choosing react js that you didn't know about - Avi Marcus...
 
Learnings,experiments,innovations
Learnings,experiments,innovationsLearnings,experiments,innovations
Learnings,experiments,innovations
 
Promoter – A Python Project for Replicating a JSS via the API
Promoter – A Python Project for Replicating a JSS via the APIPromoter – A Python Project for Replicating a JSS via the API
Promoter – A Python Project for Replicating a JSS via the API
 

Similar to Semi-automated bank transfers with Rails and Shinsei

ekb.py: KISS REST API
ekb.py: KISS REST APIekb.py: KISS REST API
ekb.py: KISS REST APIYury Yurevich
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
Yi-Ting Cheng
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
Junichi Ishida
 
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonit-people
 
Dibi Conference 2012
Dibi Conference 2012Dibi Conference 2012
Dibi Conference 2012
Scott Rutherford
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
Yi-Ting Cheng
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet
 
How to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS LambdaHow to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS Lambda
Very
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
SATOSHI TAGOMORI
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
Walther Lalk
 
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
Neo4j
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stack
cyberzeddk
 
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
MongoDB
 
淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2
Wen-Tien Chang
 
Agile startup company management and operation
Agile startup company management and operationAgile startup company management and operation
Agile startup company management and operation
Jiang Zhu
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
Hiram Fleitas León
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the things
cyberzeddk
 
Collecting 600M events/day
Collecting 600M events/dayCollecting 600M events/day
Collecting 600M events/day
Lars Marius Garshol
 

Similar to Semi-automated bank transfers with Rails and Shinsei (20)

ekb.py: KISS REST API
ekb.py: KISS REST APIekb.py: KISS REST API
ekb.py: KISS REST API
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
 
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Pythonekbpy'2012- Юрий Юревич - Как сделать REST API на Python
ekbpy'2012- Юрий Юревич - Как сделать REST API на Python
 
Dibi Conference 2012
Dibi Conference 2012Dibi Conference 2012
Dibi Conference 2012
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 
How to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS LambdaHow to Serve Blockchain Data with AWS Lambda
How to Serve Blockchain Data with AWS Lambda
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
GraphDay Paris - Intégrer des flux de données dans Neo4j avec l'ETL Open Sour...
 
Digging deeper into service stack
Digging deeper into service stackDigging deeper into service stack
Digging deeper into service stack
 
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
MongoDB Days UK: Using MongoDB to Build a Fast and Scalable Content Repositor...
 
淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2淺談 Startup 公司的軟體開發流程 v2
淺談 Startup 公司的軟體開發流程 v2
 
Agile startup company management and operation
Agile startup company management and operationAgile startup company management and operation
Agile startup company management and operation
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
 
Service stack all the things
Service stack all the thingsService stack all the things
Service stack all the things
 
Collecting 600M events/day
Collecting 600M events/dayCollecting 600M events/day
Collecting 600M events/day
 

Recently uploaded

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 

Recently uploaded (20)

AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 

Semi-automated bank transfers with Rails and Shinsei

  • 1. Tokyo Rails Meetup #36 July 24th, 2017 19:00 - Doors Open 19:30 - Semi-automated bank transfers with Rails and Shinsei - David Stosik 20:10 - Drinks, food, and networking 20:40 - Project Show and Tell 21:20 - Wrapping up 22:00 - Doors Close
  • 2. Semi-Automating Bank Transfers With Rails and ShinseiBank-Ruby David Stosik
  • 3. Who am I? David Stosik @davidstosik Engineer @ Cookpad Global Team Rails developer French In Japan since 2010 Video game fan
  • 4. Disclaimers 🙏🏻 • 👶🏻 First talk • ⏱ Last-minute prepared • 🐞 Bugs are expected • ⚠️ No responsibility • ❓ Questions
  • 5. shinseibank-ruby 🏦 • https://github.com/binzume/shinseib ank-ruby • December 2013 ~ July 2015 • Still works (!) • Single file, 758 lines
  • 6.
  • 7.
  • 8.
  • 9. Fork • https://github.com/knshiro/shinseibank-ruby • With @knshiro : Ugo Bataillard • From need to automate operations (transfers, accounting) • Now a gem • Provides CLI with Thor • Active development: contributions are welcome!
  • 10. Thor ⚡️ • https://github.com/erikhuda/thor • Toolkit for building powerful command-line interfaces • In shinseibank-ruby, allowed us to create a CLI to perform common operations
  • 11.
  • 12.
  • 13. envchain 🔑 • https://github.com/sorah/envchain • By @sorah, Cookpad developer • Securely stores secrets (Mac OS X: Keychain, Linux: Gnome’s Keyring) • Dynamically retrieves secrets and sets them as environment variables • Avoids storing secrets in clear text files
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Difficulties • Encoding: • Shinsei’s Internet banking does not accept UTF-8 • String#toutf8: This method decode MIME encoded string and convert halfwidth katakana to fullwidth katakana. If you don't want it, use NKF.nkf('-wxm0', str) 🏻🏻♂️ ??? https://ruby-doc.org/stdlib-1.8.6/libdoc/nkf/rdoc/String.html#method-i-toutf8 • Testing
  • 19.
  • 20. Goal 🎯 • Automate monthly rent transfer • Open to evolutions • Avoid issuing multiple transfers • Security • Keep last step manual
  • 21. Solution • Daily task checks if new transfer needs to be issued • On new transfer: • Create a transfer record with all details • Send by email a one-time link that executes the transfer • (Almost) No UI! • https://github.com/davidstosik/auto_transfer
  • 22. One-time links Using Rails 5’s has_secure_token
  • 23.
  • 24.
  • 25.
  • 27. ice_cube ❄️ • https://github.com/seejohnrun/ice_cube • Modeling schedules (events, with or without recurrence rules) • Powerful rule system • Serializes to YAML, can be stored in database
  • 28.
  • 29.
  • 30. Just a little bit more magic ✨ • Daily task that checks schedules to issue new transfers • Mailer that sends email with one-time link • Plain text responses for simplicity
  • 31. Conclusions ✅ • Limits: • Only Shinsei, not modular • Shinsei is updating their Internet banking! 😱 • No interface to manage schedules • One instance per user/account • Learned: • shinseibank-ruby gem uses Shinsei’s design flaws as an API • CLI with Thor • Scheduling with IceCube • Rails 5’s has_secured_token
  • 32. Thank you! Feel free to ask questions. Tokyo Rails Meetup is recruiting speakers, please talk with us if you would like to share your knowledge with the community.