Skip to content

Instantly share code, notes, and snippets.

@Hopper262
Hopper262 / async_array.js
Created February 8, 2020 17:32
Async functions called from array
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function waitAndPrint(caller, ms) {
await sleep(ms);
console.log(`Finished function ${caller}`);
}
async function func1() { await waitAndPrint('func1', 300); }
@Hopper262
Hopper262 / Pig Tournament Rules.md
Last active March 10, 2018 18:30
Pig (card game) Forbus, TN Tournament Rules

“Pig” Card Game

Forbus Tournament Rules by Jim Buck

Origin – This is a native game developed and played by people of Fentress and Pickett Counties in the north-eastern section of Middle Tennessee. Nobody seems to know the origin, they just grew up watching it played and learning the game themselves. The game has been played and passed down for generations. Although variations now exist from community to community – and often from house to house, these are the rules that I have followed and taught to others for 35+ years. The usual setting was the back of a country store, next to a “pot-belly” stove. A large cardboard box was the table and wooden soft-drink cases were used as chairs.

Object of the Game - (4 players total) The object is to be the first partnership to reach a game score of a positive 52 points or more. Points are earned by capturing “Point Cards” in tricks. If both sides exceed the game score at the end of the same hand, the team who named trumps that hand wins. If any team goes

#!/usr/bin/env perl
for my $line (<STDIN>)
{
if ($line =~ /^--(.+\S)/)
{
print "[b]" . $1 . "[/b]\n\n";
}
if ($line =~ /gui\.drawText\((?:2,164|\d+,156|\d+,170),"(.+?[^\\])"/)
{