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
# 2023-11-27 MIT LICENSE | |
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com. | |
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town. | |
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same! | |
Send me your ChatGPT text adventure game on X, I'd love to try it! |
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
[alias] | |
st = status |
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
[alias] | |
# list aliases | |
alias = "!git config -l | grep alias | cut -c 7-" | |
# one-line log | |
ls = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
# graph log | |
la = log --oneline --graph --decorate --all | |
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all |
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
# Define the groups of reviewers to use in the workflows. | |
groups: | |
- name: cloudplatform-admin | |
groups: '["@myorg/cloudplatform-admin"]' | |
- name: appteam1 | |
groups: '["@myorg/appteam1"]' | |
# Define the rules to use in the workflows. | |
# This is useful to avoid repeating the same logic in multiple workflows. | |
rules: |
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
var asyncIterable = { | |
[Symbol.asyncIterator]: async function* asyncGenerator() { | |
var array = [Promise.resolve(1), Promise.resolve(2)]; | |
while (array.length) { | |
// it waits for the promise to resolve | |
// before yield the value | |
yield await array.shift(); | |
} | |
} |
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
var asyncIterable = { | |
[Symbol.asyncIterator]: asyncIterator | |
}; | |
(async function() { | |
for await (const item of asyncIterable) { | |
console.log(item); | |
// 1 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
function asyncIterator() { | |
const array = [1, 2]; | |
return { | |
next: function() { | |
if (array.length) { | |
return Promise.resolve({ | |
value: array.shift(), | |
done: false | |
}); | |
} else { |
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 async() { | |
var one = await Promise.resolve(1); | |
var two = await Promise.resolve(2); | |
console.log(one, two); // 1 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
var iterable = { | |
[Symbol.iterator]: function* generatorWithPromise() { | |
// define an array of async data | |
const promises = [Promise.resolve(1), Promise.resolve(2)]; | |
while (promises.length) { | |
yield promises.shift(); | |
} | |
} | |
}; |
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
var iterable = { | |
[Symbol.iterator]: myGenerator | |
}; | |
for (let item of iterable) { | |
console.log(item); | |
// 1 2 | |
} |
NewerOlder