not a wiki!
8VF9NHWYY9V8J4N8LTS4VYZ
Math-mode spacing characters in increasing whitespaceyness order: \! (negative) \, \: \; \ \quad \qquad
{\centering\includegraphics[width=\textwidth, height=20mm]{filename}}
$$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} = \frac{2c}{-b \pm \sqrt{b^2 - 4ac}} $$
\noindent\rule{\textwidth}{0.4pt}
x = (−b ± sqrt(b×b − 4×a×c)) ÷ (2×a) = (2c) ÷ (-b ± sqrt(b×b − 4×a×c))
Prompts:
HISTFILESIZE=20000
LS_COLORS='di=0;34:*.zip=0;91:*.bz2=0;91:*.gz=0;91:*.xz=0;91:*.tar=0;31:ex=0;32:ln=0;36'
echo database_backup_`date +%Y-%m-%d`.sqldump
for (( i=1; $i < 19; i++ )) ; do echo $i ; done
for f in foo bar baz ; do echo $f.qux ; done
for DIR in `cat list_of_directories` ; do mkdir --parents $DIR ; done
STARTTIME=$(date +%s) ; sleep 1 ; ENDTIME=$(date +%s) ; TOTALTIME=$(( $ENDTIME - $STARTTIME )) ; echo $TOTALTIME
A=0; B=1; if ((A != 0 || B != 0)) ; then echo l ; else echo O; fi
ls -l | awk '{Z+=$5};END{print Z}'
verymagic→ \v \m \M \V
←verynotmagic
Minimal preamble:
<!DOCTYPE html><html lang=en><meta charset=utf-8>
<meta name=viewport content="width=device-width,
initial-scale=1"/>
<title> . </title><body>
<time datetime="1970-01-01 00:00">epoch</time>
XML's always-available entities: < & > ' "
CSS margin and padding: margin
is outside the element, padding
is inside. shorthand option order (same for both): top right bottom left | top right&left bottom | top&bottom right&left | all. Observe the difference:
margin r&l of 2em
padding r&l of 2em
Styling tables to be responsive on mobile:
table { display: block; white-space: nowrap;
overflow-x: auto; table-layout: fixed; }
The “table-layout:fixed” isn't necessary, but it's nice for tables in general: it makes the table's columns' widths depend only on the first row, not the entire contents of the table; tables are otherwise very weird.
youtube-dl --console-title --limit-rate 800K -o "%(upload_date)s %(title)s %(id)s.%(ext)s"
Checking command-line args:
if (isset($GLOBALS['argv'][1])) { $arg1 = $GLOBALS['argv'][1]; } else { echo "error\n"; die(); }
systemctl reboot ; systemctl poweroff
HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA:!EDH:!RC4
#!/usr/bin/perl
binmode(STDOUT, ':utf8'); binmode(STDIN, ':utf8'); binmode(STDERR, ':utf8');
use feature qw(say);
Factorial, sometimes useful: sub fac{return 1if$_[0]==0;return$_[0]*fac($_[0]-1);}
perl -mMIME::QuotedPrint -n -e 'print MIME::QuotedPrint::decode_qp($_);' < in.quotprint > out
perl -E "opendir(my $dh, '.') || die qq($!); for(1,2){ readdir($dh); } my $i = 0; foreach (sort readdir($dh)) { $i += 2; my $j = 1000-$i; my $si = sprintf('%03d.png',$i); my $sj = sprintf('%03d.png', $j); say qq(copy $_ $si); say qq(copy $_ $sj); }"
Loop control: next
for another iteration of this loop
now, including re-evaluating the conditional;
last
to exit this loop, ignoring any continue
block;
redo
to redo the loop block but not the conditional,
ignoring continue
;
a continue
block is executed before the conditional of the loop,
like the third part of a C for loop.
sudo dnf --refresh upgrade
sudo dnf system-upgrade download --releasever 29
sudo dnf system-upgrade reboot
getfedora.org/keys/ rpmfusion.org/keys
Run cpan -r
after upgrading Fedora to recompile all dynamically loaded Perl modules (for a new Encode.so etc.).
lp -d "HP-LaserJet-P2015" -o media=a4 file.txt
That particular printer does 79 chars per line before wrapping, and ~65 lines per page. CR-LFs become two newlines, just LF is a single newline. Some Latin-1 characters outside ASCII have been printed, unsure about required encoding. Changes fi and fl sequences into fi and fl ligatures.
dd if=/dev/sr0 of=image.iso bs=1M status=progress
12345678901234567890123456789012345678901234567890123456789012345678901234567890
− minus | — em-dash | – en-dash
! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
⊨ U+22A8 \models ⊨
þ Þ ð Ð Č č Š š Ž ž ʃ Ʃ ʒ Ʒ ç ŋ Ŋ
ɕ ɟ ɡ ɣ ɦ ɬ ɸ ɹ ɾ ʋ ʎ ʑ ʔ ʕ β θ χ
ʰ ʲ ʷ ˣ ˥ ˦ ˧ ˨ ˩ ː ˈ ˌ
ø ɛ œ æ ɶ ɪ ʏ ɨ ʉ ə ɵ ɐ ɯ ɤ ʌ ɔ ɑ ɒ
U+0361 o͡o U+035C o͜o
middot: · bullet: • dot-operator (sdot): ⋅
█ ▄ ▀ U+2588 U+2584 U+2580
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ τ υ φ χ ψ ω (ς)
Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω
ABEKMHOPCTYX АВЕКМНОРСТУХ
Ϙ ϙ Ϟ ϟ ‽
абвгґдеёжзийклмнопрстуфхцчшщъыьэюя