Skip to content

Instantly share code, notes, and snippets.

View wilg's full-sized avatar
🚀
Doing new things

Wil Gieseler wilg

🚀
Doing new things
View GitHub Profile
@wilg
wilg / parallel_map.swift
Last active February 9, 2024 20:21 — forked from DougGregor/parallel_map.swift
Swift async/await implementation of a parallel map
import Foundation
// https://gist.github.com/DougGregor/92a2e4f6e11f6d733fb5065e9d1c880f
extension Collection {
func parallelMap<T>(
parallelism requestedParallelism: Int? = nil,
_ transform: @escaping (Element) async throws -> T
) async rethrows -> [T] {
let defaultParallelism = 2
let parallelism = requestedParallelism ?? defaultParallelism
@wilg
wilg / index.js
Last active October 31, 2018 19:08 — forked from tommoor/index.js
requirebin sketch
const React = require('react');
const ReactDOM = require ('react-dom');
const Render = require('react-emoji-render');
// try swapping the commented lines below and hit "Run Code" in the top right
// to see another rendering style!
const Emoji = Render.Emojione;
//const Emoji = Render.Twemoji;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wilg
wilg / README.md
Last active March 14, 2021 09:01 — forked from mbostock/.block