npm install --save request
node bitcoin-price.js
This file contains 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
// zod schema | |
z.object({ | |
// valid if string or: | |
optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
nullable: z.string().nullable(), // field explicitly `null` | |
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
}); | |
// type | |
{ |
This file contains 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
export default defineConfig({ | |
plugins: [ | |
laravel(['resources/js/app.js']), | |
{ | |
name: 'ziggy', | |
enforce: 'post', | |
handleHotUpdate({ server, file }) { | |
if (file.includes('/routes/') && file.endsWith('.php')) { | |
exec('php artisan ziggy:generate', (error, stdout) => error === null && console.log(` > Ziggy routes generated!`)) | |
} |
This file contains 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
2gua.rainbow-brackets | |
adampalhazi.vscode-debug-arrow-function | |
alexcvzz.vscode-sqlite | |
alfnielsen.vsc-organize-imports | |
aliariff.auto-add-brackets | |
andys8.jest-snippets | |
antfu.iconify | |
antfu.vite | |
apollographql.vscode-apollo | |
arcticicestudio.nord-visual-studio-code |
This file contains 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
{ | |
"git.enableSmartCommit": true, | |
"workbench.editor.decorations.colors": true, | |
"editor.minimap.enabled": false, | |
"editor.accessibilitySupport": "off", | |
"zenMode.hideLineNumbers": false, | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"tailwindCSS.includeLanguages": { | |
"typescriptreact": "html", | |
"plaintext": "html", |
This file contains 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
{ | |
"kind": "youtube#videoListResponse", | |
"etag": "\"Dn5xIderbhAnUk5TAW0qkFFir0M/PmyFcfudY-pRuyR1eE-yWB5uLE4\"", | |
"pageInfo": { | |
"totalResults": 1, | |
"resultsPerPage": 1 | |
}, | |
"items": [ | |
{ | |
"kind": "youtube#video", |
This file contains 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] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
This file contains 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 | |
use PhpCsFixer\Config; | |
use PhpCsFixer\Finder; | |
$rules = [ | |
'array_indentation' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
'binary_operator_spaces' => [ | |
'default' => 'single_space', |
This file contains 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 | |
namespace App\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
use Illuminate\Support\Facades\DB; | |
/** | |
* Class Kernel | |
* @package App\Http |
This file contains 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 IncomingWebhook = require("@slack/client").IncomingWebhook | |
const SLACK_WEBHOOK_URL = "SLACK_WEBHOOK_URL" | |
const webhook = new IncomingWebhook(SLACK_WEBHOOK_URL) | |
// subscribe is the main function called by Cloud Functions. | |
module.exports.slackSubscribe = (event, callback) => { | |
const build = eventToBuild(event.data.data) | |
// Skip if the current status is not in the status list. |
NewerOlder