Skip to content

Instantly share code, notes, and snippets.

@iketiunn
Last active June 30, 2016 08:56
Show Gist options
  • Save iketiunn/5706541c3483d271a2a9 to your computer and use it in GitHub Desktop.
Save iketiunn/5706541c3483d271a2a9 to your computer and use it in GitHub Desktop.
Some useful cli commands

Parse json with python

λ curl http://somewhere/data.json | python -m json.tool

Search file by content

Search dir . with conetent partten abc and files with *.php

λ grep --include=\*.php -rnw . -e "abc" 

Get IP and host name in LAN (In Mac)

// Find brodcast IP. ex 192.168.1.255
λ ifconfig
λ ping 192.168.1.255
λ amp -a 

Using env var inside sed quote

ref

  1. using double quote whitin single qoute
  2. using @ or other symbol as delimiter instead \, in case your var contains \
pwd | sed 's@'"$HOME"'@@'

Increase keyboard sensitive in x environment

xset r rate 200 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment