Skip to content

Instantly share code, notes, and snippets.

View RyKilleen's full-sized avatar

Ryan Killeen RyKilleen

View GitHub Profile
@RyKilleen
RyKilleen / async-batch-process.ts
Created April 23, 2024 17:44
Snippet: async batch promise tasks
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);
}
}
@RyKilleen
RyKilleen / choco.config
Last active September 8, 2022 01:06
Chocolatey Installs Config
<?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" />
// 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',
@RyKilleen
RyKilleen / setup.ps1
Last active September 8, 2022 01:16
Choco Install / System setup
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
@RyKilleen
RyKilleen / javascriptreact.json
Last active February 5, 2019 18:07
VS Code User Snippets for Javascript React Components (Functional, Class, and Testing). https://code.visualstudio.com/docs/editor/userdefinedsnippets
{
"Stateless Component": {
"prefix": "component:stateless",
"body" : [
"import React from 'react';",
"import PropTypes from 'prop-types';",
"const propTypes = {",
"",
"};",
@RyKilleen
RyKilleen / GithubPushLabels.ps1
Last active March 26, 2018 13:42
Powershell Script
<#
.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
#>