Items here are still in progress and I haven't determined with 100% certainty that the content is true. Please verify the content. ;-)
- Abstract factory
System.Data.Common.DbProviderFactory
| /** | |
| * counter | |
| * ======= | |
| * Creates counter that will generate number, starting from `start` (default to 0) | |
| * incrementing (or decrementing) by `step` (default to 1). Based on | |
| * [Python's itertools.count](http://docs.python.org/library/itertools.html#itertools.count). | |
| * | |
| * cycle | |
| * ===== | |
| * Returns a function that will generate items in `iterable` for each call, |
| [T]he difference between a bad programmer and a | |
| good one is whether he considers his code or his | |
| data structures more important. Bad programmers | |
| worry about the code. Good programmers worry about | |
| data structures and their relationships. | |
| -- Linus Torvalds | |
| ~~~ | |
| Clarity and brevity sometimes are at odds. | |
| When they are, I choose clarity. | |
| -- Jacob Kaplan-Moss |
| TAR | |
| tar -cf archive.tar foo bar # Create archive.tar from files foo and bar. | |
| tar -tvf archive.tar # List all files in archive.tar verbosely. | |
| tar -xf archive.tar # Extract all files from archive.tar. | |
| # get line 5 to end, then print fifth column, sort, then get uniq. | |
| sed -n '5,$p' <file> | gawk '{print $5}' | sort | uniq | |
| # remove vss files within folder and sub folders | |
| find . -iname '*.*scc' -type f -print0 | xargs -0 rm |
| $sound = New-Object System.Media.SoundPlayer; | |
| function Initialize-Alert { | |
| $sound.SoundLocation="$env:WINDIR\Media\ringout.wav"; | |
| } | |
| function Alert-User { | |
| $sound.Play(); | |
| } |
| type Grade = A | B | C | D | E | F | InvalidGrade | |
| let (|MoreThan|_|) grade value = | |
| if value > grade then Some MoreThan else None | |
| let (|LessThan|_|) grade value = | |
| if value < grade then Some LessThan else None | |
| let (|Between|_|) uppergrade lowergrade value = | |
| if uppergrade >= value && value >= lowergrade then Some Between else None |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yegor256/tacit@gh-pages/tacit-css.min.css"/> | |
| <script type="module" src="main.js"></script> | |
| <title>Document</title> | |
| </head> |
| # Ensure lalest versions of these command apps are installed. Some autocompletions have additional requirements as indicated | |
| # requirement: Install-Module DockerCompletion -Scope CurrentUser | |
| Import-Module DockerCompletion | |
| # requirement: Install-Module npm-completion -Scope CurrentUser | |
| Import-Module npm-completion | |
| helm completion powershell | Out-String | Invoke-Expression | |
| kubectl completion powershell | Out-String | Invoke-Expression |
| param( | |
| [int]$numRecords | |
| ) | |
| $filename = "measurements.txt" | |
| if ($numRecords -eq $null) { | |
| Write-Host "Usage: create_measurements.ps1 <number of records to create>" | |
| exit 1 | |
| } |