This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo pacman -Scc | |
| sudo pacman -Syu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public Guid combineThose(Guid[] IDs_) { | |
| const int length = 16; | |
| return IDs_.Aggregate(Guid.Empty, (Accumulate, Current) => { | |
| var result = new byte[length]; | |
| var asByteArrayAccumulate = Accumulate.ToByteArray(); | |
| var asByteArrayCurrent = Current.ToByteArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const createEnumeration = (...keys) => | |
| keys.reduce( | |
| (result, key) => Object.assign(result, { [key]: key }), | |
| {} | |
| ); | |
| const myEnum = createEnumeration( | |
| 'first', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def do_magic(decimal_num:int): | |
| if decimal_num < 2: | |
| return decimal_num | |
| result = 0 | |
| square_num = 2 | |
| while square_num < decimal_num: | |
| square_num *= 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Clear-Host | |
| Set-Location $PSScriptRoot | |
| $main = { | |
| npm list --prod | | |
| Select-Object -Skip 1 | # First line is the project itself | |
| Get-Dependency | | |
| Sort-Object | | |
| Get-Unique | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const myArray = Array.from({length: 10}, (e, i)=> i) | |
| doWork( | |
| doSomethingWith, | |
| myArray, | |
| logToConsole | |
| ) | |
| //Die Funktion, die das Ganze abarbeitet | |
| async function doWork(doSomething, anArray, aCallback) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $sample = @( | |
| [PSCustomObject]@{ | |
| From = [datetime]::Parse("01.01.2022 00:00:00") | |
| To = [datetime]::Parse("10.01.2022 23:59:59") | |
| } | |
| [PSCustomObject]@{ | |
| From = [datetime]::Parse("05.01.2022 00:00:00") | |
| To = [datetime]::Parse("15.01.2022 23:59:59") | |
| } | |
| [PSCustomObject]@{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class ReadFromCsv { | |
| public static IEnumerable<IDictionary> asKeyValuePairs(this TextReader Reader_, string Delimiter_ = ";") { | |
| var splitThis = Delimiter_.asSplitter(); | |
| var result = new List<Dictionary<string, object>>(); | |
| var columns = splitThis(Reader_.ReadLine()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function combineIds() { | |
| param( | |
| [Parameter()] | |
| [Guid]$First, | |
| [Parameter()] | |
| [Guid]$Second | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getStartOfWeek() { | |
| begin { | |
| $base = [DayOfWeek]::Monday | |
| } | |
| process { | |
| $difference = $_.DayOfWeek - $base | |
| $offset = (7 + $difference) % 7 * -1 | |
NewerOlder