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
enum Bytes { | |
JPGStartMarker = 0xffd8, | |
EXIFMarker = 0xffe1, | |
EXIFInfo = 0x45786966, | |
OrientationMarker = 0x0112, | |
Empty = 0xff00, | |
ExifAlignment = 0x4949 | |
} |
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
# This function truncates multiple line texts | |
# @pre - set 'line-height' prop for container | |
# @param container - jQuery elem holding the text | |
# @param text - text to truncate | |
# @param lines - number of text lines in container | |
truncateText: (container, text, lines) -> | |
container.text text | |
maxHeight = lines * parseFloat container.css 'line-height' | |
# return original text w/o '...' | |
return text if container.innerHeight() <= maxHeight |
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
$ISOFile = "C:\Users\DELL\Downloads\17763.737.190906-2324.rs5_release_svc_refresh_SERVERHYPERCORE_OEM_x64FRE_en-us_1.iso" | |
$USBDrive = Get-Disk | Where FriendlyName -eq " USB Flash Memory" | |
$USBDrive | Clear-Disk -RemoveData -Confirm:$true -PassThru | |
$USBDrive | Set-Disk -PartitionStyle GPT | |
$Volume = $USBDrive | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem FAT32 -NewFileSystemLabel WS2019 | |
$ISOMounted = Mount-DiskImage -ImagePath $ISOFile -StorageType ISO -PassThru | |
$ISODriveLetter = ($ISOMounted | Get-Volume).DriveLetter | |
Copy-Item -Path ($ISODriveLetter +":\*") -Destination ($Volume.DriveLetter + ":\") -Recurse |
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
export function retryPromise<T>(fn: () => Promise<T>, retriesLeft = 5, interval = 375): Promise<T> { | |
return new Promise((resolve, reject) => { | |
fn() | |
.then(resolve) | |
.catch(error => { | |
setTimeout(() => { | |
if (retriesLeft === 1) { | |
// reject('maximum retries exceeded'); | |
reject(error); | |
return; |