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
| Source: https://github.com/orgs/community/discussions/6874#discussioncomment-14734100 | |
| # Windows Powershell | |
| gh api /notifications -X GET | ConvertFrom-Json | ForEach-Object { gh api "/notifications/threads/$($_.id)" -X PATCH } | |
| # Linux | |
| gh api /notifications -X GET | jq -r '.[].id' | xargs -I {} gh api /notifications/threads/{} -X PATCH |
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
| #!/usr/bin/env bash | |
| N=${1:-5} | |
| if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1; then | |
| echo "Error: Not inside a Git repository." | |
| exit 1 | |
| fi | |
| git log --merges -n "$N" \ |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| usage() { | |
| echo "Usage: $0 -u <URL> -p <path>" >&2 | |
| echo " -u URL of the file to download." >&2 | |
| echo " -p Local path and filename to save the file as." >&2 | |
| return 1 |
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
| #!/usr/bin/env bash | |
| mkdir -p ~/config/etc/php/8.0/fpm/conf.d/ | |
| touch ~/config/etc/php/8.0/fpm/conf.d/20-xdebug.ini | |
| cat > ~/config/etc/php/8.0/fpm/conf.d/20-xdebug.ini <<EOL | |
| zend_extension=xdebug.so | |
| xdebug.mode = debug | |
| xdebug.client_host = 127.0.0.1 | |
| xdebug.client_port = 9003 |
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
| eslint --no-config-lookup --rule "no-console: error" having_inline_rule_enabled.js | |
| 1:1 error Unexpected console statement no-console | |
| 1:13 error Strings must use doublequote quotes | |
| 5:33 error Strings must use doublequote quotes | |
| ✖ 3 problems (3 errors, 0 warnings) | |
| 2 errors and 0 warnings potentially fixable with the `--fix` option. |
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 customEventHandling = () => { | |
| document.addEventListener('this-is-my-custom-event', (event) => { | |
| console.log('THIS SHOULD PRINT ON DISPATCHED EVENT!'); | |
| console.log(event) | |
| }); | |
| document.onreadystatechange = () => { | |
| if (document.readyState !== "complete") { | |
| console.log('not ready yet'); |
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
| yarn install | |
| yarn install v1.19.1 | |
| [1/4] Resolving packages... | |
| [2/4] Fetching packages... | |
| info [email protected]: The platform "linux" is incompatible with this module. | |
| info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. | |
| [3/4] Linking dependencies... | |
| [4/4] Building fresh packages... | |
| [-/6] ⠄ waiting... | |
| [-/6] ⠄ waiting... |
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": "jest-test", | |
| "version": "1.0.0", | |
| "lockfileVersion": 1, | |
| "requires": true, | |
| "dependencies": { | |
| "@babel/code-frame": { | |
| "version": "7.5.5", | |
| "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", | |
| "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", |
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
| highland(range).map((i) => { | |
| return highland(createPromise(i)); | |
| }) | |
| .flatten() | |
| .errors((error, push) => { | |
| if (error) { | |
| push(null, null); | |
| } | |
| }) | |
| .compact() |
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
| package com.dreamlines.commons | |
| import scala.concurrent.{ExecutionContext, Future} | |
| /** | |
| * This LazyFuture helps working with futures with concurrency | |
| * | |
| * @param f | |
| * @tparam A | |
| */ |
NewerOlder