OOZOU
ติดต่อเรา
Back to TILToday I Learned

shell

30 notes on shell from the OOZOU team.

all topicsshell 30ruby on rails 22ruby 12macos 10vim 7figma 4cli 3javascript 3heroku 1elixir 1
shell8 ธันวาคม 2563

Run incognito/private commands for Bash and Zsh

Simply put a space before the command and it won't be saved to ~/.bash\_history. E.g. qrencode -o out.png "Some secret text"

shell22 ตุลาคม 2563

Upgrade postgres database with homebrew

To upgrade postgres you can run

shell13 ตุลาคม 2563

Amazon AWS S3 CLI copy with set perms

Open term (or equivalent) and paste the following:

shell13 ตุลาคม 2563

Angry Docker Purge

If you receive No Space left error on Docker this the brute force solution:

shell13 ตุลาคม 2563

Back up a file with same name + prefix

NOTE: Actually you can use !#:1 in every command 'cause that's last argument passed to a command.

shell13 ตุลาคม 2563

Bash aliases and magic

I have a seperate file in my user folder named ~/.aliases. I use this to store all of my bash aliases. I use aliases a lot and add new ones regularly so I created a bash function to add new aliases…

shell13 ตุลาคม 2563

Check for IKEA item availability

If you're waiting for an IKEA item to restock, here's a practical solution to stay updated automatically. This guide explains how to use a shell script to check IKEA's stock availability and get…

shell13 ตุลาคม 2563

Check if command exists with shell script

Check if command exists with shell script

shell13 ตุลาคม 2563

Create your own git commands (aliases)

Ever wanted to shorten a git command? You can go with shell alilas for sure but you have to always include context so that you don't forget what each ailas stands for but you can define your own…

shell13 ตุลาคม 2563

Delete already-merged branchs in Git

You can safelist more branches in egrep -v 'master|develop|foo|bar'

shell13 ตุลาคม 2563

Delete merged git branches

Handy git command for deleting all local git branches that already merged git branch --merged | egrep -v "(^\\|master|dev)" | xargs git branch -d*

shell13 ตุลาคม 2563

Diff a local file with remote version in Git

Easily run the below command and get a diff version from the remote

shell13 ตุลาคม 2563

Find a branch based on a commit

c198bb715 Make default expired description logic pretty `

shell13 ตุลาคม 2563

Force push previous commit to repo

If you push some code and want to force push a previous commit you can do so with shell git push origin +commit\sha^:branch\name

shell13 ตุลาคม 2563

Get current git branch name

Get current git branch name

shell13 ตุลาคม 2563

Go through a file Git history (GUI)

Go through a file Git history (GUI)

shell13 ตุลาคม 2563

Kill rails that got stuck

I'd like to kill rails running w/specific port. (My laptop running several rails servers. )

shell13 ตุลาคม 2563

Kill unresponsive SSH session

Occasionally an SSH session may become unresponsive. If I put my laptop to sleep this happens fairly often. Rather than killing the tab you can use SSH Escape Characters to kill the session

shell13 ตุลาคม 2563

List directory structure except one or more dirs

Ever wanted to display the structure of the current directory except or two directories?

shell13 ตุลาคม 2563

make a pr from command line using hub

install hub first with brew: brew install hub then use a simple command, like at the example below: hub pull-request -m "best pr ever" -b oozou:develop -h feature/awesome-improvements

shell13 ตุลาคม 2563

Remove unwanted commit from your branch

Remove unwanted commit from your branch

shell13 ตุลาคม 2563

Restore a deleted file in Git

Restore a deleted file in Git

shell13 ตุลาคม 2563

Run same command on different input/inputs

If you have to run the same command repetitively over different input/inputs.

shell13 ตุลาคม 2563

See deleted files in previous commits [git]

See deleted files in previous commits [git]

shell13 ตุลาคม 2563

Send messages to Slack using cURL

Slack allows you to send messages via the Webhooks service

shell13 ตุลาคม 2563

Shallow clone a old repo

If you don't need the full git history for a repo you will be working on you can supply a clone depth to only clone x revisions of the repo.

shell13 ตุลาคม 2563

Use `host` to get more information about domains

You might be using dig to find out A/CNAME/MX etc records of a domain from DNS servers. But if you just want to get a quick overview, use host:

shell13 ตุลาคม 2563

Using Git's aliases feature

Git allows you to create aliases internally through the config. Your global config should be located here ~/.gitconfig

shell13 ตุลาคม 2563

Watch CI status on Github

When you have Github's hub installed, you can get the ci-status of your current branch like this:

shell13 ตุลาคม 2563

Zsh function to list file tree

When navigating through directories on the command line, it’s often helpful to see the structure of directories and subdirectories in a "tree" format. While there are plenty of tools out there, such…

มีโปรเจกต์ในใจ?

เรายินดีรับฟังสิ่งที่คุณกำลังสร้าง

เริ่มต้นสนทนาhello@oozou.com
OOZOU Logo

กรุงเทพฯ · สิงคโปร์ · ฮ่องกง

X
Facebook
Instagram
LinkedIn

บริการ

  • พัฒนาเว็บ
  • AI และ Generative AI
  • พัฒนาแอปมือถือ
  • การวิเคราะห์และวิศวกรรมข้อมูล
  • ออกแบบ UI/UX และผลิตภัณฑ์
  • การเปลี่ยนแปลงทางดิจิทัล

บริษัท

  • เกี่ยวกับเรา
  • ร่วมงานกับเรา
  • บล็อก
  • เอกสารวิชาการ
  • กรณีศึกษา
  • Today I Learned
  • ติดต่อเรา

เพิ่มเติม

  • อุตสาหกรรม
  • ขอใบเสนอราคา
  • เครือข่ายพันธมิตร
© 2026 OOZOU สงวนลิขสิทธิ์
นโยบายความเป็นส่วนตัวจรรยาบรรณนโยบาย ABAC