(requires Tampermonkey browser extension to be installed)
This Github Actions workflow file lets you deploy multiple websites to Cloudflare Pages in subfolders instead of subdomains by using an intermediate repository to hold the built files.
- Create a new repository where the files will get deployed to. That is your build repo, and you should set up your Pages from that repo.
- Create a secret in your repo or organization called
DEPLOY_PATwith the value of a GitHub personal access token of an account that has access to push to your build repo - Edit the values under
env:- replace
AuthorNameGoesHerewith the author of the build repo - replace
BuildRepoNameGoesHerewith the name of the build repo - replace
UsernameOfPATGoesHerewith the username of the account you created the personal access token for
- replace
Given a field called Birthday (of which only the day and month are used), the Next Birthday Formula will be the date of their next birthday. It will be this year if their birthday hasn't passed yet, or next year if it is past their birthday.
Made by @lpghatguy and @evaera
if(empty(prop("Birthday")), prop("Birthday"), dateAdd(dateAdd(dateAdd(dateAdd(fromTimestamp(0), toNumber(formatDate(prop("Birthday"), "D")) - 1, "days"), toNumber(formatDate(prop("Birthday"), "M")) - 1, "months"), toNumber(formatDate(now(), "Y")) - 1970 + if(toNumber(formatDate(now(), "M")) >= toNumber(formatDate(prop("Birthday"), "M")), if(toNumber(formatDate(now(), "D")) > toNumber(formatDate(prop("Birthday"), "D")), 1, 0), 0), "years"), 24 - toNumber(formatDate(fromTimestamp(0), "H")), "hours"))
- Use descriptive and obvious names.
- Don't use abbreviations, use full English words.
playeris better thanplr. - Name things as directly as possible.
wasCalledis better thanhasBeenCalled.notifyis better thandoNotification. - Name booleans as if they are yes or no questions.
isFirstRunis better thanfirstRun. - Name functions using verb forms:
incrementis better thanplusOne.unzipis better thanfilesFromZip. - Name event handlers to express when they run.
onClickis better thanclick. - Put statements and expressions in positive form.
isFlyinginstead ofisNotFlying.lateintead ofnotOnTime.- Lead with positive conditionals. Avoid
if not something then ... else ... end.
- Don't use abbreviations, use full English words.
- If we only care about the inverse of a variable, turn it into a positive name.
missingValueinstead ofnot hasValue.
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
| function throttle(func, seconds) | |
| local lastCalled = 0 | |
| local callNumber = 0 | |
| return function(...) | |
| callNumber = callNumber + 1 | |
| local currentCallNumber = callNumber | |
| if tick() - lastCalled < seconds then | |
| wait(seconds - (tick() - lastCalled)) |
