App-Cheats

 view release on metacpan or  search on metacpan

cheats.txt  view on Meta::CPAN


# Watch the UI sessions
watch -d -n1 screen -list

# Alias command to watch all the files in the current directory for changes
alias watch_files='watch ls -alF'


#############################################################
## Linux Commands - wget
#############################################################

# Pass through wget firewall/proxy (Download)
read -sp "Password: " PASSWORD
export http_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
export https_proxy=http://xbe4092:$PASSWORD@pratt-proxyva.utc.com:8080/
# If password contains special characters (like #,@ ...)


#############################################################
## Linux Commands - whereis
#############################################################

# Locate a program
which perl
whereis perl


#############################################################
## Linux Commands - who
#############################################################

# See all users on the bench
who


#############################################################
## Linux Commands - xargs
#############################################################

# Make xargs work when files may have spaces in the name (Added: 2017-10-27 08:48:11 AM)
# changes the delimiter from a space to a newline
ls abc\ file.txt | xargs -d "\n" grep tuff


#############################################################
## Linux Commands - xrandr
#############################################################

# Find out the monitor/screen size (pi)
xrandr
/opt/vc/bin/tvservice -s


#############################################################
## Linux Commands - xsel
#############################################################

# Use copy and paste on the command line.
sudo apt install xsel
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'


#############################################################
## Linux Commands - xterm
#############################################################

# Resize window (Putty,xterm)
echo -e '\e[8;50;100t'

# Minimize the window for a few seconds, then restore it (Putty,xterm)
echo -e '\e[2t' && sleep 2 && echo -e '\e[1t'

# Move the window to the top/left corner of the display (Putty,xterm)
echo -e '\e[3;0;0t'

# Zoom the window (Putty,xterm)
echo -e '\e[9;1t'

# Bring the window to the front (without changing keyboard focus) (Putty,xterm)
echo -e '\e[5t'

 Change the name of an xterm window to "string"
echo -ne "\033]2;string\007"

# Change the name of an xterm icon to "string"
echo -ne "\033]1;string\007"

# Change the name of an xterm icon and window to "string"
echo -ne "\033]0;string\007"

# Create alias to easily change the window name and icon name
# Must be run together!
set_title(){ echo -ne "\033]0;$@\007"; }
alias title='set_title'

# Get dimensions/size of a screen/xterm
xdpyinfo | grep dimensions
xrandr | grep '*'

# Get the size of an xterm window
xwininfo

# Get info about current xterm window
xdpyinfo

# Get size info of a named xterm window
xwininfo -name omsGUI_0_3

# Get info about an xterm window
xprop -id <window_id>
xprop -id 0x2400022

# Get position of the cursor
perl -e '$/ = "R";' -e 'print "\033[6n";my $x=<STDIN>;my($n, $m)=$x=~m/(\d+)\;(\d+)/;print "Current position: $m, $n\n";'

# Print how many columns and rows an xterm window uses for its screen size
tput cols
tput lines
reset



( run in 3.137 seconds using v1.01-cache-2.11-cpan-59e3e3084b8 )