# markdown

MD:
¶syntax ¶string

#Format Syntax
Linux file -printf
    %p → Name with Path
    %f → File Name Only
    %s → File Size
    %u → File’s Owner
    %g → File’s Group
    %m → File’s permissions
    %y → File’s Type
Generic (C++ "%?", Python 3 {:?}, …)
    d → Decimal
    c → Character
    e → Float with Exponent
    f → Float
    g → Shorter of e or f
    i → Integer
    o → Octal
    s → String
    u → Unsigned Decimal/Integer
    x → Hex Lower Case
    X → Hex Upper Case
Escapes
    " → Quote Mark
    \b → Backspace
    \f → Form Feed
    \n → New Line
    \r → Return
    \t → Tab
    \v → Vertical Tab
    \\ → Backslash
Sizing w.p where: p="Precision", w="Minimum Width"
Justification Procced sizing with
    - (C++) or < (Python) → Left justify
    ^ (Python) → Center
    Nothing → Right
Miscelaneous Proced sizing with
    + → show + when positive
    0 → Pad with zeros instead of justifying


MD:
¶tkinter ¶bind

Alt_L		The left-hand alt key
Alt_R		The right-hand alt key
BackSpace		backspace
Cancel		break
Caps_Lock		CapsLock
Control_L		The left-hand control key
Control_R		The right-hand control key
Delete		Delete
Down		↓
End		end
Escape		esc
Execute		SysReq
F1		Function key F1
F2		Function key F2
Fi		Function key Fi
F12		Function key F12
Home		home
Insert		insert
Left		←
Linefeed		Linefeed (control-J)
KP_0		0 on the keypad
KP_1		1 on the keypad
KP_2		2 on the keypad
KP_3		3 on the keypad
KP_4		4 on the keypad
KP_5		5 on the keypad
KP_6		6 on the keypad
KP_7		7 on the keypad
KP_8		8 on the keypad
KP_9		9 on the keypad
KP_Add		+ on the keypad
KP_Begin		The center key (same key as 5) on the keypad
KP_Decimal		Decimal (.) on the keypad
KP_Delete		delete on the keypad
KP_Divide		/ on the keypad
KP_Down		↓ on the keypad
KP_End		end on the keypad
KP_Enter		enter on the keypad
KP_Home		home on the keypad
KP_Insert		insert on the keypad
KP_Left		← on the keypad
KP_Multiply		× on the keypad
KP_Next		PageDown on the keypad
KP_Prior		PageUp on the keypad
KP_Right		→ on the keypad
KP_Subtract		- on the keypad
KP_Up		↑ on the keypad
Next		PageDown
Num_Lock		NumLock
Pause		pause
Print		PrintScrn
Prior		PageUp
Return		The enter key (control-M). The name Enter refers to a mouse-related event, not a keypress; see Section 54, “Events”
Right		→
Scroll_Lock		ScrollLock
Shift_L		The left-hand shift key
Shift_R		The right-hand shift key
Tab		The tab key
Up		↑


MD:
¶regex

\n	line feed
\r 	cr
\t 	tab
\d 	digit
\D 	not digit
\w 	[A-Za-z0-9_]
\W	Not \w
\s	whitespace
\S	not whitespace
\x	followed by 2 char hex code
\0	followed by 2 char oct code
\c	followed by char /cz ctrl+z
\b	begin or end word
^	start of string or set negate
$	end of string
\*	zero or more
+	one or more
?	zero or one


MD:
(?!) - negative lookahead
(?=) - positive lookahead
(?<=) - positive lookbehind
(?<!) - negative lookbehind

¶regex


MD:
¶regex

leading \b equivalent (^|(?<=\W))
trailing \b equivalent ($|(?=\W))
better than \W is [^a-zA-Z0-9'-]
better than \w is [a-zA-Z0-9'-]
 


MD:
¶string

&Aacute; \&Aacute; 	U+00C1<br>
&aacute; \&aacute; 	U+00E1<br>
&Acirc; \&Acirc; 	U+00C2<br>
&acirc; \&acirc; 	U+00E2<br>
&acute; \&acute; 	U+00B4<br>
&AElig; \&AElig; 	U+00C6<br>
&aelig; \&aelig; 	U+00E6<br>
&Agrave; \&Agrave; 	U+00C0<br>
&agrave; \&agrave; 	U+00E0<br>
&alefsym; \&alefsym; 	U+2135<br>
&Alpha; \&Alpha; 	U+0391<br>
&alpha; \&alpha; 	U+03B1<br>
&amp; \&amp; 	U+0026<br>
&and; \&and; 	U+2227<br>
&ang; \&ang; 	U+2220<br>
&Aring; \&Aring; 	U+00C5<br>
&aring; \&aring; 	U+00E5<br>
&asymp; \&asymp; 	U+2248<br>
&Atilde; \&Atilde; 	U+00C3<br>
&atilde; \&atilde; 	U+00E3<br>
&Auml; \&Auml; 	U+00C4<br>
&auml; \&auml; 	U+00E4<br>
&bdquo; \&bdquo; 	U+201E<br>
&Beta; \&Beta; 	U+0392<br>
&beta; \&beta; 	U+03B2<br>
&brvbar; \&brvbar; 	U+00A6<br>
&bull; \&bull; 	U+2022<br>
&cap; \&cap; 	U+2229<br>
&Ccedil; \&Ccedil; 	U+00C7<br>
&ccedil; \&ccedil; 	U+00E7<br>
&cedil; \&cedil; 	U+00B8<br>
&cent; \&cent; 	U+00A2<br>
&Chi; \&Chi; 	U+03A7<br>
&chi; \&chi; 	U+03C7<br>
&circ; \&circ; 	U+02C6<br>
&clubs; \&clubs; 	U+2663<br>
&cong; \&cong; 	U+2245<br>
&copy; \&copy; 	U+00A9<br>
&crarr; \&crarr; 	U+21B5<br>
&cup; \&cup; 	U+222A<br>
&curren; \&curren; 	U+00A4<br>
&Dagger; \&Dagger; 	U+2021<br>
&dagger; \&dagger; 	U+2020<br>
&dArr; \&dArr; 	U+21D3<br>
&darr; \&darr; 	U+2193<br>
&deg; \&deg; 	U+00B0<br>
&Delta; \&Delta; 	U+0394<br>
&delta; \&delta; 	U+03B4<br>
&diams; \&diams; 	U+2666<br>
&divide; \&divide; 	U+00F7<br>
&Eacute; \&Eacute; 	U+00C9<br>
&eacute; \&eacute; 	U+00E9<br>
&Ecirc; \&Ecirc; 	U+00CA<br>
&ecirc; \&ecirc; 	U+00EA<br>
&Egrave; \&Egrave; 	U+00C8<br>
&egrave; \&egrave; 	U+00E8<br>
&empty; \&empty; 	U+2205<br>
&Epsilon; \&Epsilon; 	U+0395<br>
&epsilon; \&epsilon; 	U+03B5<br>
&equiv; \&equiv; 	U+2261<br>
&Eta; \&Eta; 	U+0397<br>
&eta; \&eta; 	U+03B7<br>
&ETH; \&ETH; 	U+00D0<br>
&eth; \&eth; 	U+00F0<br>
&Euml; \&Euml; 	U+00CB<br>
&euml; \&euml; 	U+00EB<br>
&euro; \&euro; 	U+20AC<br>
&exist; \&exist; 	U+2203<br>
&fnof; \&fnof; 	U+0192<br>
&forall; \&forall; 	U+2200<br>
&frac12; \&frac12; 	U+00BD<br>
&frac14; \&frac14; 	U+00BC<br>
&frac34; \&frac34; 	U+00BE<br>
&frasl; \&frasl; 	U+2044<br>
&Gamma; \&Gamma; 	U+0393<br>
&gamma; \&gamma; 	U+03B3<br>
&ge; \&ge; 	U+2265<br>
&gt; \&gt; 	U+003E<br>
&hArr; \&hArr; 	U+21D4<br>
&harr; \&harr; 	U+2194<br>
&hearts; \&hearts; 	U+2665<br>
&hellip; \&hellip; 	U+2026<br>
&Iacute; \&Iacute; 	U+00CD<br>
&iacute; \&iacute; 	U+00ED<br>
&Icirc; \&Icirc; 	U+00CE<br>
&icirc; \&icirc; 	U+00EE<br>
&iexcl; \&iexcl; 	U+00A1<br>
&Igrave; \&Igrave; 	U+00CC<br>
&igrave; \&igrave; 	U+00EC<br>
&image; \&image; 	U+2111<br>
&infin; \&infin; 	U+221E<br>
&int; \&int; 	U+222B<br>
&Iota; \&Iota; 	U+0399<br>
&iota; \&iota; 	U+03B9<br>
&iquest; \&iquest; 	U+00BF<br>
&isin; \&isin; 	U+2208<br>
&Iuml; \&Iuml; 	U+00CF<br>
&iuml; \&iuml; 	U+00EF<br>
&Kappa; \&Kappa; 	U+039A<br>
&kappa; \&kappa; 	U+03BA<br>
&Lambda; \&Lambda; 	U+039B<br>
&lambda; \&lambda; 	U+03BB<br>
&lang; \&lang; 	U+2329<br>
&laquo; \&laquo; 	U+00AB<br>
&lArr; \&lArr; 	U+21D0<br>
&larr; \&larr; 	U+2190<br>
&lceil; \&lceil; 	U+2308<br>
&ldquo; \&ldquo; 	U+201C<br>
&le; \&le; 	U+2264<br>
&lfloor; \&lfloor; 	U+230A<br>
&lowast; \&lowast; 	U+2217<br>
&loz; \&loz; 	U+25CA<br>
&lsaquo; \&lsaquo; 	U+2039<br>
&lsquo; \&lsquo; 	U+2018<br>
&lt; \&lt; 	U+003C<br>
&macr; \&macr; 	U+00AF<br>
&mdash; \&mdash; 	U+2014<br>
&micro; \&micro; 	U+00B5<br>
&middot; \&middot; 	U+00B7<br>
&minus; \&minus; 	U+2212<br>
&Mu; \&Mu; 	U+039C<br>
&mu; \&mu; 	U+03BC<br>
&nabla; \&nabla; 	U+2207<br>
&ndash; \&ndash; 	U+2013<br>
&ne; \&ne; 	U+2260<br>
&ni; \&ni; 	U+220B<br>
&not; \&not; 	U+00AC<br>
&notin; \&notin; 	U+2209<br>
&nsub; \&nsub; 	U+2284<br>
&Ntilde; \&Ntilde; 	U+00D1<br>
&ntilde; \&ntilde; 	U+00F1<br>
&Nu; \&Nu; 	U+039D<br>
&nu; \&nu; 	U+03BD<br>
&Oacute; \&Oacute; 	U+00D3<br>
&oacute; \&oacute; 	U+00F3<br>
&Ocirc; \&Ocirc; 	U+00D4<br>
&ocirc; \&ocirc; 	U+00F4<br>
&OElig; \&OElig; 	U+0152<br>
&oelig; \&oelig; 	U+0153<br>
&Ograve; \&Ograve; 	U+00D2<br>
&ograve; \&ograve; 	U+00F2<br>
&oline; \&oline; 	U+203E<br>
&Omega; \&Omega; 	U+03A9<br>
&omega; \&omega; 	U+03C9<br>
&Omicron; \&Omicron; 	U+039F<br>
&omicron; \&omicron; 	U+03BF<br>
&oplus; \&oplus; 	U+2295<br>
&or; \&or; 	U+2228<br>
&ordf; \&ordf; 	U+00AA<br>
&ordm; \&ordm; 	U+00BA<br>
&Oslash; \&Oslash; 	U+00D8<br>
&oslash; \&oslash; 	U+00F8<br>
&Otilde; \&Otilde; 	U+00D5<br>
&otilde; \&otilde; 	U+00F5<br>
&otimes; \&otimes; 	U+2297<br>
&Ouml; \&Ouml; 	U+00D6<br>
&ouml; \&ouml; 	U+00F6<br>
&para; \&para; 	U+00B6<br>
&part; \&part; 	U+2202<br>
&permil; \&permil; 	U+2030<br>
&perp; \&perp; 	U+22A5<br>
&Phi; \&Phi; 	U+03A6<br>
&phi; \&phi; 	U+03C6<br>
&Pi; \&Pi; 	U+03A0<br>
&pi; \&pi; 	U+03C0<br>
&piv; \&piv; 	U+03D6<br>
&plusmn; \&plusmn; 	U+00B1<br>
&pound; \&pound; 	U+00A3<br>
&Prime; \&Prime; 	U+2033<br>
&prime; \&prime; 	U+2032<br>
&prod; \&prod; 	U+220F<br>
&prop; \&prop; 	U+221D<br>
&Psi; \&Psi; 	U+03A8<br>
&psi; \&psi; 	U+03C8<br>
&quot; \&quot; 	U+0022<br>
&radic; \&radic; 	U+221A<br>
&rang; \&rang; 	U+232A<br>
&raquo; \&raquo; 	U+00BB<br>
&rArr; \&rArr; 	U+21D2<br>
&rarr; \&rarr; 	U+2192<br>
&rceil; \&rceil; 	U+2309<br>
&rdquo; \&rdquo; 	U+201D<br>
&real; \&real; 	U+211C<br>
&reg; \&reg; 	U+00AE<br>
&rfloor; \&rfloor; 	U+230B<br>
&Rho; \&Rho; 	U+03A1<br>
&rho; \&rho; 	U+03C1<br>
&rsaquo; \&rsaquo; 	U+203A<br>
&rsquo; \&rsquo; 	U+2019<br>
&sbquo; \&sbquo; 	U+201A<br>
&Scaron; \&Scaron; 	U+0160<br>
&scaron; \&scaron; 	U+0161<br>
&sdot; \&sdot; 	U+22C5<br>
&sect; \&sect; 	U+00A7<br>
&shy; \&shy; 	U+00AD<br>
&Sigma; \&Sigma; 	U+03A3<br>
&sigma; \&sigma; 	U+03C3<br>
&sigmaf; \&sigmaf; 	U+03C2<br>
&sim; \&sim; 	U+223C<br>
&spades; \&spades; 	U+2660<br>
&sub; \&sub; 	U+2282<br>
&sube; \&sube; 	U+2286<br>
&sum; \&sum; 	U+2211<br>
&sup; \&sup; 	U+2283<br>
&sup1; \&sup1; 	U+00B9<br>
&sup2; \&sup2; 	U+00B2<br>
&sup3; \&sup3; 	U+00B3<br>
&supe; \&supe; 	U+2287<br>
&szlig; \&szlig; 	U+00DF<br>
&Tau; \&Tau; 	U+03A4<br>
&tau; \&tau; 	U+03C4<br>
&there4; \&there4; 	U+2234<br>
&Theta; \&Theta; 	U+0398<br>
&theta; \&theta; 	U+03B8<br>
&thetasym; \&thetasym; 	U+03D1<br>
&THORN; \&THORN; 	U+00DE<br>
&thorn; \&thorn; 	U+00FE<br>
&tilde; \&tilde; 	U+02DC<br>
&times; \&times; 	U+00D7<br>
&trade; \&trade; 	U+2122<br>
&Uacute; \&Uacute; 	U+00DA<br>
&uacute; \&uacute; 	U+00FA<br>
&uArr; \&uArr; 	U+21D1<br>
&uarr; \&uarr; 	U+2191<br>
&Ucirc; \&Ucirc; 	U+00DB<br>
&ucirc; \&ucirc; 	U+00FB<br>
&Ugrave; \&Ugrave; 	U+00D9<br>
&ugrave; \&ugrave; 	U+00F9<br>
&uml; \&uml; 	U+00A8<br>
&upsih; \&upsih; 	U+03D2<br>
&Upsilon; \&Upsilon; 	U+03A5<br>
&upsilon; \&upsilon; 	U+03C5<br>
&Uuml; \&Uuml; 	U+00DC<br>
&uuml; \&uuml; 	U+00FC<br>
&weierp; \&weierp; 	U+2118<br>
&Xi; \&Xi; 	U+039E<br>
&xi; \&xi; 	U+03BE<br>
&Yacute; \&Yacute; 	U+00DD<br>
&yacute; \&yacute; 	U+00FD<br>
&yen; \&yen; 	U+00A5<br>
&Yuml; \&Yuml; 	U+0178<br>
&yuml; \&yuml; 	U+00FF<br>
&Zeta; \&Zeta; 	U+0396<br>
&zeta; \&zeta; 	U+03B6<br>


MD:
Starts with false equivocation fallacy. DNA isn't like a book.
-- books are specified information - DNA isn't
-- DNA copies itself with errors - books Don't
-- DNA is found in nature - books aren't
Follows it with a lie that something from nothing is a "scientific Impossibility"
Uses an appeal to irrelevant authority fallacy ~ Dawkins on Physics to support his lie
Tried to talk to an actual Physicist (Kraus). Didn't like the answer so ran away to talk to college students that were ignorant of Physics, Biology, and Philosophy again because they didn't know how to point out how he is full of BS
Then he lies DNA is a computer program
Uses an appeal to irrelevant authority fallacy ~ Gates  on Biology to support his lie
Tries many chicken and egg style Biology based arguments  form ignorance fallacies on the ignorant college students
Uses an argument form ignorance fallacy about morality (asserts it must come from his god) lol the Bible shows his god being very immoral

¶bad_science ¶lie ¶stupid ¶atheist


MD:
Czech Republic	16%
Sweden	18%
Estonia	18%
Norway 22%
France	27%
Netherlands	28%
Denmark	28%
Iceland	31%
Slovenia	32%
Finland	33%
Bulgaria	36%
Belgium	37%
United Kingdom	37%
Latvia	38%
Germany	44%
Austria	44%
Switzerland	44%
Hungary	45%
Luxembourg	46%
Lithuania	47%

¶atheist ¶faith


MD:
VBoxManage internalCommands CreateRawVmdk -filename ... -rawdisk \\PhysicalDrive#
replace ... with path
replace # with actual number
if multiple partitions all are there they all are there

¶hack


MD:
¶string

#Bash String Manipulation
***
###String Length ${#string} 
###Get Sub String ${string:pos:len)
- len is optional
- pos is 0 based, if negitive in () then from the right
###Remove RegEx Sub String (ress)
- ${string#ress) **shortest match from the front**
- ${string##ress) **longest match from the front**
- ${string%ress) **shortest match from the back**
- ${string%%ress) **longest match from the back**
###Replace RegEx Sub String (ress)
- ${string/ress/replacement} **replace first match**
- ${string//ress/replacement} **replace all matches**
- ${string/#ress/replacement} **replace if match front of string**
- ${string/%ress/replacement} **replace if match back of string**
###File's full path stored in $1
- fpath=${1%/*} **Path without trailing slash /**
- xfile=${1##*/} **Filename+"."+Extension**
- xfext=${xfile##*.} **File extension only**
- xfname=${xfile%.*} **Filename Only**


MD:
sudo usermod -a -G vboxusers $USER
sudo usermod -a -G disk $USER
restart
sudo VBoxManage internalcommands createrawvmdk -filename  ~/usb?.vmdk -rawdisk /dev/sd?
sudo chown $USER:$USER ~/usb?.vmdk
? = thumb drive letter
check efi boot
when restart remove the fake drive and leave on efi boot

¶hack


MD:
¶file

**comm** [-13|-23|-12] [SortedFile1] [SortedFile2]
**Results based on Parameter**
&rarr; -13 only in SortedFile2<br>
&rarr; -23 only in SortedFile1<br>
&rarr; -12 in both sorted files
----
**uniq** [-i|] [SortedFile]
**Parameter**
&rarr; -i ignore case
**Result**
&rarr; removes all duplicates
----
**fold** -w [string]
**Result**
&rarr; string is folded to a character width specified
----
**[head|tail]** [-b #|-n #]
**Results based on Parameter**
&rarr; -b  gives [first|last] # of bytes<br>
&rarr; -n  gives [first|last] # of lines
----
**wc**
**Result**
&rarr; NewLineCount WordCount ByteCount
----
**shuf** [-n #|]
**Parameter**
&rarr; -n only top # of lines
**Result**
&rarr; randomly shuffles lines


MD:
Given weekday of a month:
1st
m h 1-7 * * test $(date +\%u) -eq d
2nd
m h 8-14 * * test $(date +\%u) -eq d
3rd
m h 15-21 * * test $(date +\%u) -eq d
4th
m h 22-28 * * test $(date +\%u) -eq d
last
m h * * d test $(date +\%m) -ne $(date -d 7days +\%m)
last weekday of month
m h 26-31 * * test $(date +\%d) -eq $(cal $(date +"\%m \%Y") | awk '{ if(NF>1) a=$NF ; if (NF==7) a=$6}END{print a}')
Key: (d=0-6 which is sun-sat) at time h:m

¶automation


MD:
## Install RPMs in Ubuntu
#### Prepare
- sudo apt-get install alien dpkg-dev debhelper build-essential
#### For each RPM you want to install
- sudo alien **RPM_File_Here**
- Find and run the **deb_file** in your home folder

¶software


MD:
####rsync
- With compression during transfer use options -avz
- Without compression during transfer use options -av
- Command is /usr/bin/rsync **options** \-\-delete \-\-exclude-from **ExcludeFile** **SourceWithTrailingSlash** **Destination**
- If you don't want to replicate deletes in the source to the destination then leave out \-\-delete
- If you want to exclude many patterns put them in **ExcludeFile**
- If you want to exclude a single pattern use \-\-exclude **Pattern** instead of \-\-exclude-from **ExcludeFile**
- If you don't want to exclude anything leave out \-\-exclude-from **ExcludeFile**
- if you want to exclude everything except a pattern or paterns then use \-\-include-from **IncludeFile** instead of \-\-exclude-from **ExcludeFile** or use use \-\-include **Pattern** instead of \-\-exclude **Pattern**
#####Syntax of Patterns in command or file (one per line)
Leave off the source folder for example to back up a home folder without its .wine folder 
Source is /home/username/
.wine folder is /home/username/.wine
pattern is .wine*
**Common Patterns**
- Any folders for mounting
- Public*
- Templates*
- VirtualBox VMs*
- .cache*
- .wine*
- .config*
- .local*

¶backup


MD:
#Using rsync with Cron
***
Edit your crontab
>export EDITOR=**FavoriteTextEditorHere** ; crontab -e'
Add a line as such
>**M** **H** * * * /usr/bin/rsync -av \-\-delete '**SourceFolder**/' '**DestFolder**'
- Where **M** & **H** are the minute and hour of the daily (or multiple-daily) backup
- **SourceFolder** is the folder you wish to backup (/ at end needed)
- **DestFolder** is the folder you wish to backup to  (No / at end)
- The literals surrounding the folders should be included
The three asterisks are **day of month**, **month**, **day of week** in that order. If you wish the backup to be less frequent than daily you can use them. If not leave asterisks.
For multiple-Daily Backups can make **M** **H**
- **0,15,30,45 * ** Backup every 15 minutes
- **10,40 8-16** Backup every 30 minutes during the work day
- **0 10,12,14,16** Backup on the hour 4 times in the work day
- **0 * ** Backup every hour on the hour

¶automation ¶backup


