This file contains 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
$directory = "C:\full-path\to-photos-directory" | |
# Only .jpg files larger than 10mb | |
$files = Get-ChildItem -Path $directory -Filter *.jpg | Where-Object Length -gt 10mb | |
# Use ForEach-Object with the -Parallel parameter | |
$files | ForEach-Object -Parallel { | |
# Define the new filename with '_edited' suffix | |
$newFileName = [IO.Path]::Combine($_.DirectoryName, ($_.BaseName + "_edited" + $_.Extension)) |
This file contains 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
async function* asyncBatchGenerator<T>( | |
tasks: (() => Promise<T>)[], | |
batchSize: number | |
): AsyncGenerator<PromiseSettledResult<T>[]> { | |
for (let i = 0; i < tasks.length; i += batchSize) { | |
const batchTasks = tasks.slice(i, i + batchSize); | |
const batchPromises = batchTasks.map((task) => task()); | |
yield Promise.allSettled(batchPromises); | |
} | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<packages> | |
<package id="7zip.install" /> | |
<package id="chocolatey" /> | |
<package id="chocolatey-core.extension" /> | |
<package id="chocolatey-misc-helpers.extension" /> | |
<package id="chocolatey-windowsupdate.extension" /> | |
<package id="docker" /> | |
<package id="docker-cli" /> | |
<package id="DotNet4.5.2" /> |
This file contains 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
// Check out https://github.com/bnb/awesome-hyper for more awesome plugins | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains 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
choco install choco.config | |
#### System Settings | |
$key = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' | |
Set-ItemProperty $key Hidden 1 # Show Hidden Files | |
Set-ItemProperty $key HideFileExt 0 # Don't Hide File Extensions | |
Set-ItemProperty $key ShowSuperHidden 1 # Show Hidden System Files | |
Stop-Process -processname explorer # Reset Explorer |
This file contains 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
{ | |
"Stateless Component": { | |
"prefix": "component:stateless", | |
"body" : [ | |
"import React from 'react';", | |
"import PropTypes from 'prop-types';", | |
"const propTypes = {", | |
"", | |
"};", |
This file contains 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
<# | |
.SYNOPSIS | |
Send an array of labels to a Github Repo | |
.DESCRIPTION | |
.EXAMPLE | |
Post-GithubLabels "##############" "myOrganization" "myRepo" '[{"name": "bug","color": "fc2929"},{"name": "duplicate","color": "cccccc"}]'' | |
.NOTES | |
Author : Ryan Killeen | |
#> |