This file contains hidden or 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
-- https://gist.github.com/dig1t/e7555d724300d2faf51419fba5d6783a | |
--[=[ | |
@class Leaderstats | |
Author: dig1t | |
Description: A module for managing player leaderstats | |
]=] |
This file contains hidden or 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
--!strict | |
local CollectionService = game:GetService("CollectionService") | |
-- This will be the tag you'll be adding | |
-- to every part that can damage players | |
local LAVA_TAG = "Lava" | |
-- We'll save our connections here so we can clean them up later | |
local connections: { [BasePart]: RBXScriptConnection } = {} |
This file contains hidden or 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
# Give all aftman tools full permissions | |
sudo chmod -R 755 ~/.aftman | |
sudo chown -R $(whoami):staff ~/.aftman |
This file contains hidden or 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
// .vscode/extensions.json | |
{ | |
"recommendations": [ | |
"evaera.vscode-rojo", | |
"JohnnyMorganz.luau-lsp", | |
"Kampfkarren.selene-vscode", | |
"JohnnyMorganz.stylua" | |
] | |
} |
This file contains hidden or 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
[tools] | |
luau-lsp = "JohnnyMorganz/[email protected]" | |
rojo = "rojo-rbx/[email protected]" | |
selene = "Kampfkarren/[email protected]" | |
wally = "UpliftGames/[email protected]" | |
wally-package-types = "JohnnyMorganz/[email protected]" |
This file contains hidden or 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
# .github/workflows/docs.yml | |
name: Deploy documentation to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' |
This file contains hidden or 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
const yourAsyncFunction = async () => { | |
// do stuff | |
console.log('this will run first') | |
await new Promise((resolve, reject) => { | |
console.log('this will run second in 1000ms') | |
setTimeout(() => resolve(), 1000) | |
}) |
This file contains hidden or 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
const highlighter = (text, toSelect) => { | |
const keywords = toSelect.split(' ').filter(word => word.length > 0) | |
return keywords.length > 0 ? text.replace(new RegExp( | |
'(\\w*(' + keywords.join('|') + '))\\w*', 'gi'), | |
match => `<b>${match}</b>` | |
) : text | |
} | |
// Test Cases |