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 state = [ | |
| [5, 4, 3, 2, 1], | |
| [], | |
| [] | |
| ] | |
| const A = 0; | |
| const B = 1; | |
| const C = 2; |
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
| import { test } from "@playwright/test"; | |
| const userAgent = | |
| "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"; | |
| test.use({ | |
| userAgent, | |
| }); | |
| test("Genius", async ({ page }) => { |
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
| name: Tagged Commit Check | |
| on: | |
| pull_request: | |
| branches: | |
| - <protected_branch_name> | |
| jobs: | |
| check-tagged-commit: | |
| runs-on: ubuntu-latest |
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
| exports.text =` | |
| Improved own provided blessing may peculiar domestic. Sight house has sex never. No visited raising gravity outward subject my cottage mr be. Hold do at tore in park feet near my case. Invitation at understood occasional sentiments insipidity inhabiting in. Off melancholy alteration principles old. Is do speedily kindness properly oh. Respect article painted cottage he is offices parlors. | |
| Mind what no by kept. Celebrated no he decisively thoroughly. Our asked sex point her she seems. New plenty she horses parish design you. Stuff sight equal of my woody. Him children bringing goodness suitable she entirely put far daughter. | |
| Contented get distrusts certainty nay are frankness concealed ham. On unaffected resolution on considered of. No thought me husband or colonel forming effects. End sitting shewing who saw besides son musical adapted. Contrasted interested eat alteration pianoforte sympathize was. He families believed if no elegance interest surprise an. It abode wrong miles an so delay pl |
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 recursiveCaesarCipher = (shift, text) => { | |
| const inner = (shift, [ letter, ...rest]) => { | |
| const index = alphabet.indexOf(letter); | |
| const newIndex = (index + shift) % alphabet.length; | |
| return [ | |
| index >= 0 ? alphabet[newIndex] : letter, | |
| ...rest.length ? inner(shift, rest) : [] | |
| ] | |
| } |
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 primeSeive = (n) => { | |
| const primes = [] | |
| // Start with an array of all numbers between 2 and n | |
| let buf = Array(n - 1).fill().map((_, i) => i + 2); | |
| let pointer = 0; | |
| while (pointer < buf.length) { | |
| const p = buf[pointer]; | |
| // Push the prime | |
| primes.push(p); |
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://journal.stuffwithstuff.com/2009/06/05/naming-things-in-code/ | |
| https://journal.stuffwithstuff.com/2016/06/16/long-names-are-long/ |
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
| [alias] | |
| push-force = push --force-with-lease | |
| tree = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
| scratch-commit = commit -m \"fixup\" | |
| signoff = commit --amend --signoff | |
| alias = config --get-regexp ^alias\\. | |
| # from https://gist.github.com/hkaj/97c16a9ec6df6e6f1e18 | |
| checkoutpr = "!f() { git fetch origin refs/pull/$1/head:pr/$1; git checkout pr/$1; } ; f" | |
| checkoutcontrib = "!f() { git checkout master && git pull && git remote add $1 git@github.com:$1/dd-agent && git fetch $1 $2 && git checkout -b $3 $1/$2 && git rebase master } ; f" |
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
| delete-merged-branches = "!f() { git checkout --quiet master && git branch --merged | grep --invert-match '\\*' | xargs -n 1 git branch --delete; git checkout --quiet @{-1}; }; f" |
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
| import os | |
| from balena import Balena | |
| balena = Balena() | |
| token = os.environ['TOKEN'] | |
| appId = os.environ['APP_ID'] | |
| balena.auth.login_with_token(token) | |
| user = balena.auth.who_am_i() | |
| app = balena.models.application.get(appId) |
NewerOlder