Tagged: Mac

0

Saving putty session

Here is how to save putty session on your windows machine Registry location of putty sessions HKEY_CURRENT_USER\Software\Simontatham Exporting registry to .reg file regedit /e “%userprofile%\desktop\putty-registry.reg” HKEY_CURRENT_USER\Software\Simontatham To import? “Double click”   More Turbocharge PuTTY with 12 Powerful Add-Ons – Software...

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

Run a script as root

Source: http://www.cyberciti.biz/tips/shell-root-user-check-script.html Sometime it is necessary to find out if a shell script is being run as root user or not. When user account created a user ID is assigned to each user. BASH shell stores the user ID in $UID...

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

ldapsearch – ldap command to test connection

Well the post name is a misnomer. Lately I’ve been using ldapsearch command to test connection to ldap server, hence the name. Following is the shell command, $ ldapsearch -x -LLL -h ldapserver.example.com -D username -w password -b “DC=example,DC=com” -s...

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

Processing shell program arguments

Method 1: Without using getopts while [[ $# > 1 ]] do key=”$1″ case $key in -u|–user) _USER=”$2″ shift # past argument ;; -s|–server) _SERVER=”$2″ shift # past argument ;; *) # unknown option printf “Usage: %s: [-s <server> -u...

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...