Skip to content

Instantly share code, notes, and snippets.

IP Bastola ipbastola

Block or report user

Report or block ipbastola

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ipbastola
ipbastola / find-duplicates-in-excel.md
Created Jun 20, 2019
ow to find duplicates in Excel: identify, highlight count, filter, and more
View find-duplicates-in-excel.md
@ipbastola
ipbastola / jq to filter by value.md
Last active Oct 7, 2019
JQ to filter JSON by value
View jq to filter by value.md

JQ to filter JSON by value

Syntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'

Example: To get json record having _id equal 611

cat my.json | jq -c '.[] | select( ._id | contains(611))'

Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)

@ipbastola
ipbastola / free-system-space.md
Last active May 19, 2019
Free System space from massive log files
View free-system-space.md

Free System Space from Massive Logs

  1. Remove compressed log files from /var/log
$ sudo find /var/log -type f -name "*.gz" -delete
  1. Truncate Log files
$ cd /var/log
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active Oct 19, 2019
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
View clean-up-boot-partition-ubuntu.md

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@ipbastola
ipbastola / cifs-mount.md
Created Jul 21, 2016
How to mount CIFS into Ubuntu 14.04-x64 LTS
View cifs-mount.md

CIFS Mount on Ubuntu 14.04

1. Install packages

$ sudo apt-get install cifs-utils

2. Create a Mount point Directory

$ sudo mkdir /mnt/CIFSMOUNT
You can’t perform that action at this time.