App-Cheats

 view release on metacpan or  search on metacpan

cheats.txt  view on Meta::CPAN

# Search for text in commit message.
git log --grep COMMIT_TEXT


#############################################################
## Git - RefLog Commands
#############################################################

# git reflog can be useful if you messed something up with a branch:
# Such as:
# - Accidentally did a hard reset.
# - Undo merge/rebase.
# - Remove deleted branches.
# - Fix detached HEAD state.


#############################################################
## Git - Push/Pull Commands
#############################################################

# Push upstream to origin from the branch (only after using -u switch)

cheats.txt  view on Meta::CPAN

# Segmentation fault in perl on some systems (Gentoo,SEGV)
# https://github.com/Perl/perl5/issues/19147
perl -we '$a{$b}'

# Run script multiple times in order and stop on the first error.
for n in {1..1000}; do perl -I. -IKernel/cpan-lib -MSchedule::Cron::Events -E 'eval{ Schedule::Cron::Events->new("* * 0 * *", Date => [ 16, 25, 16, 10, 7, 123])}; say "OK"'; if [ $? -ne 0 ]; then echo "STOPPED on run: $n"; break; fi; done

# Perl SEGV due to confess
https://github.com/Perl/perl5/issues/15928

# Variable suicide bug (fixed pre v5.6)
https://perldoc.perl.org/perlfaq7#What-is-variable-suicide-and-how-can-I-prevent-it?
perl -E 'my $f = 'foo'; sub func { while ($i++ < 3) { my $f = $f; $f .= "bar"; say $f }} func; say "Finally $f\n"'    foobar                                                       foobar
foobar
Finally foo

# Perl lexical variable eval bug (fixed after 5.40).
https://www.perlmonks.org/?node_id=11158351
https://github.com/Perl/perl5/pull/22097

# Refresh a Module (bug):
https://www.perlmonks.org/?node_id=11161935

cheats.txt  view on Meta::CPAN



#############################################################
## Ubuntu - Filesystem
#############################################################

# Show Hide/Hidden Files (Ubuntu)
Control + H

# Mount wired network connection (Ubuntu,linux)
# Useful is policykit-i is accidentally removed
sudo dhclient -v usb0

# Remove trash icon in Ubuntu left panel.
gsettings get org.gnome.shell.extensions.dash-to-dock show-trash   # true
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false

# Trash folder locaiton on Ubuntu
~/.locat/share/Trash


cheats.txt  view on Meta::CPAN

# History is not working (Vim)
# Check permissions of ~/.viminfo

# View man page (Vim,help)
:h

# Search for spaces (Vim)
/\s\+
# \+ since all are taken literally unless escaped

# If accidentally pressed <Control> + s (Vim)
# that will freeze the terminal. This is due to  "flow control"
# Do this to undo the effect:
<Control> + q
#
# To permanently disable this from occurring put this in .bashrc
stty -ixon

# Stop all output to terminal/xterm (Vim)
<Control> + s



( run in 0.289 second using v1.01-cache-2.11-cpan-de7293f3b23 )