Tagged: Mac

0

iTerm2 shell integration scripts offline usage

At times we are working in an internet less environment. So, here are a few things we can do, Make the scripts available over a local http server Change scripts for any http://internet-address/ to http://local-address Making scripts available on local $...

0

Fixing Wi-Fi Issues in OS X El Capitan

  # Stubborn wifi fix for the impatient (El Capitan & Sierra) sudo rm /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist sudo rm /Library/Preferences/SystemConfiguration/com.apple.wifi.message-tracer.plist sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist sudo rm /Library/Preferences/SystemConfiguration/preferences.plist   Source: http://osxdaily.com/2015/10/16/fix-wi-fi-problems-mac-os-x-el-capitan/ Though Apple has largely resolved the wi-fi issues that persisted in some Macs...

0

iTerm shell integration

Important – iTerm shell integration Shell integration should be installed on all remote hosts Connections to non standard ssh port (other than 22) can be setup in ~/.ssh/config. Format below Host www.adhocshare.tk HostName 192.168.80.200 Port 10527   Iterm2 bash prompt...

0

Super charge bash with these bash_profile tips

Some tips and tricks to super charge bash Tip #01: Up down arrow auto complete ~/.inputrc #File: ~/.inputrc ## arrow up “\e[A”:history-search-backward ## arrow down “\e[B”:history-search-forward   Tip #2: Auto complete hostnames in ssh, scp. More details here. $ brew install...

0

Setup bulk password-less ssh

Following script will help in setting up password-less ssh in one shot to multiple machines, Usage sample: $ remote-keyless.sh <file_of_hosts.txt> [password] #!/usr/bin/expect -f # remote-keyless.sh, v0.1, 2016-05-03, [email protected] # v0.2, 2016-09-28, [email protected] – added to make it compatible with pdsh ;)...

0

A nice .vimrc

Using the settings below will add colors to vi editor, change the tabstops to 4 and adds more niceness. This is how my .vimrc looks like. filetype plugin indent on ” show existing tab with 4 spaces width set number...

0

umask in *nix operating systems

Source: http://askubuntu.com/questions/44542/what-is-umask-and-how-does-it-work To calculate for the umask, unlike file system permissions. The octal umasks are calculated via the bitwise AND of the unary complement of the argument using bitwise NOT. The octal notations are as follows: Octal value : Permission 0...

0

TextWrangler Text Filter collection

Location  ~/Library/Application Support/TextWrangler/Text Filters Tidy HTML.sh #!/bin/sh # run “tidy” on the file given as 1st (and only) parameter. # /usr/bin/tidy -utf8 -asxhtml -indent -wrap 100 -quiet 2> /dev/null Tidy XML.sh #!/bin/sh XMLLINT_INDENT=$” ” xmllint –format –encode utf-8 – Tidy JSON.py...

0

Lookup YARN Acls capacity scheduler queue users from /etc/passwd

Following is an awk script that I use in TextWrangler as a Text Filter. This script generates the required awk and grep commands to lookup /etc/passwd file. #!/bin/sh # gawk ‘{match($0,”([a-zA-Z]+).acl_submit_applications=(.*)”,a); if(a[1] != “”) print a[1] “\t” a[2] }’ #...

0

Create ISO on Mac – the easy way

Create an ISO on Mac from a folder $ hdiutil makehybrid -o ~/Desktop/image.iso ~/path/to/folder/to/be/converted -iso -joliet     Related posts: Transparent image file on MAC MAC terminal shortcut keys How-to: Install Hue on a Mac Lync for Mac removal script