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
Ruby Scripts To Make Life Easier
Search
Paulo Ancheta
December 06, 2016
Programming
1
140
Ruby Scripts To Make Life Easier
Introduction to subprocesses and how to use them for everyday use.
Paulo Ancheta
December 06, 2016
Tweet
Share
More Decks by Paulo Ancheta
See All by Paulo Ancheta
Demystifying Git
pauloancheta
0
55
A PR Has Been Submitted
pauloancheta
0
57
Other Decks in Programming
See All in Programming
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
AI時代の認知負荷との向き合い方
optfit
0
160
2026年 エンジニアリング自己学習法
yumechi
0
130
CSC307 Lecture 07
javiergs
PRO
0
550
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
Patterns of Patterns
denyspoltorak
0
1.4k
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
CSC307 Lecture 05
javiergs
PRO
0
500
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Side Projects
sachag
455
43k
Why Our Code Smells
bkeepers
PRO
340
58k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
Context Engineering - Making Every Token Count
addyosmani
9
660
Chasing Engaging Ingredients in Design
codingconduct
0
110
WCS-LA-2024
lcolladotor
0
450
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
150
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Transcript
Ruby Scripts to Make Life Easier #MakeRubyGreatAgain
@PauloAncheta
We make alias-es all the time. We should make something
more useful.
# talk.rb system “echo hello world” $ ruby talk.rb hello
world
# talk* #! bin/env ruby `echo hello world` $ mv
talk.rb talk $ chmod u+x talk $ ./talk hello world
# talk* #! bin/env ruby string = “hello world” `echo
#{string}` $ ./talk hello world
# talk* #! bin/env ruby string = “hello world” `echo
#{string.gsub(/world/, “VanRuby”) } | grep file.txt` $ ./talk | more file.txt hello VanRuby
$ irb irb(main):001:0> files = `ls` => “Applications\nDesktop\nDocuments\nDow nloads\nLibrary\nMovies\nMusic\nPictur es\nPublic\ntalk\n”
irb(main):002:0> files.class => String
irb(main):003:0> system `ls` => true
All of that is great. How can I be productive
doe?
# clean-pg* #! bin/env ruby pg = `ps aux |
grep postgres | grep waiting` pg = pg.split(/\n/) pg.each do |waiting| # ... some process to get the pid `kill #{pid}` end
# split-branch* #! bin/env ruby # commits => 1z2y3 TICKET-number
msg specific_commits = `git log - -pretty - -oneline | grep #{ARGV}` `git checkout master && git pull origin master && git checkout -b test-branch` specific_commits.each do |commit| sha = commit[0..6] # => [123asdf, qwer456, … ] `git cherry-pick #{sha}` end
#MakeRubyGreatAgain