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
Pattern newProjectPattern = Pattern.compile("(?<=before)(Stuff to actually find)(?=after)"); | |
Matcher newProjectMatcher = newProjectPattern.matcher(str); | |
if (newProjectMatcher.find()) { | |
return newProjectMatcher.group(1).trim(); | |
} |
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
Map a Mac keyboard so it has Windows shortcuts | |
https://karabiner-elements.pqrs.org/ | |
https://ke-complex-modifications.pqrs.org/#pc_shortcuts | |
{ | |
"description": "PC-Style Screenshot to File (PrintScreen to select)", |
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
<?php | |
class Hello { | |
protected string $name = ''; | |
public function __construct() { | |
return $this; | |
} | |
public function setName(string $name): Hello { |
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 functions = require('@google-cloud/functions-framework'); | |
const express = require('express'); | |
const app = express(); | |
// GET /myFunction | |
app.get('/', async (req, res) => { | |
res.status(200).send('Default route'); | |
}); | |
// GET /myFunction/other |
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
# Add this command line option: | |
-XX:+ShowCodeDetailsInExceptionMessages |
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
.select { | |
background-image: url("data:image/svg+xml;utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201000%201805.18%22%3E%3Cpath%20fill%3D%22%23595d64%22%20d%3D%22M461.6%2C643.4L10.9%2C79.9C-14.9%2C47.7%2C8%2C0%2C49.3%2C0h901.5c41.2%2C0%2C64.1%2C47.7%2C38.4%2C79.9L538.4%2C643.4%09C518.7%2C668%2C481.3%2C668%2C461.6%2C643.4z%22%20transform%3D%22rotate(180%20500%20902.59)%20translate(0%201143.28)%22%3E%3C%2Fpath%3E%3Cpath%20fill%3D%22%23595d64%22%20d%3D%22M461.6%2C643.4L10.9%2C79.9C-14.9%2C47.7%2C8%2C0%2C49.3%2C0h901.5c41.2%2C0%2C64.1%2C47.7%2C38.4%2C79.9L538.4%2C643.4%09C518.7%2C668%2C481.3%2C668%2C461.6%2C643.4z%22%20transform%3D%22translate(0%201143.28)%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); | |
background-position: right calc(7px) top 50%; | |
} |
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
$ op read --out-file my-service-account.json "op://My Vault/My Record/my-service-account.json" | |
$ chmod 644 my-service-account.json |
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
stages: | |
- build | |
- test | |
- deploy | |
variables: | |
NODE_ENV: production | |
build: | |
stage: build |
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
test('Wait for 1 second', async () => { | |
runBeforeTheDelay(); | |
await new Promise((r) => setTimeout(r, 1000)); | |
runAfterTheDelay(); | |
}); |
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
/* | |
// Usage: | |
<button id="counter" type="button"></button> | |
import { setupCounter } from './counter.js' | |
setupCounter(document.querySelector('#counter')) | |
*/ | |
export function setupCounter(element) { |
NewerOlder