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
| { | |
| "editor.formatOnSave": true, | |
| "editor.codeActionsOnSave": { | |
| "source.fixAll.eslint": "explicit" | |
| }, | |
| "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], | |
| "eslint.alwaysShowStatus": true, | |
| "typescript.preferences.importModuleSpecifier": "non-relative", | |
| "files.exclude": { | |
| "**/.git": true, |
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
| # | |
| # Example job to run on Verda Cloud (formerly DataCrunch). | |
| # This will launch a cluster which will be autodeleted in 120 minutes and will run the training job on it. | |
| # | |
| # $ mkdir -p ${HOME}/.verda | |
| # $ echo { "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET" } > ${HOME}/.verda/config.json | |
| # $ pip install skypilot[verda] | |
| # $ sky launch -i 120 train.yaml | |
| # | |
| name: minGPT-ddp |
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 | |
| if [ $# -lt 1 ]; then | |
| echo "usage: $0 ENVIRONMENT" >&2 | |
| exit 1 | |
| fi | |
| ENVIRONMENT="$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
| class Inngest < Formula | |
| desc "Workflow orchestration platform" | |
| homepage "https://github.com/inngest/inngest/" | |
| url "https://github.com/inngest/inngest.git", | |
| tag: "v1.13.4" | |
| license "Apache-2.0" | |
| head "https://github.com/inngest/inngest.git", branch: "main" | |
| depends_on "go" => :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
| -- Query to fetch Bitcoin price data and format as a nice table | |
| WITH api_response AS ( | |
| SELECT content::jsonb as data | |
| FROM http_get('https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=300&interval=daily') | |
| ), | |
| price_data AS ( | |
| SELECT | |
| jsonb_array_elements(data->'prices') as price_array | |
| FROM api_response | |
| ) |
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 getBase64Image(img) { | |
| var canvas = document.createElement("canvas"); | |
| canvas.width = img.naturalWidth; | |
| canvas.height = img.naturalHeight; | |
| var ctx = canvas.getContext("2d"); | |
| ctx.drawImage(img, 0, 0); | |
| var dataURL = canvas.toDataURL("image/png"); | |
| return dataURL.replace(/^data:image\/(png|jpg);base64,/, ""); | |
| } |
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 { DgramSocket } = require("node-unix-socket"); | |
| const http = require("node:http"); | |
| /** | |
| * Implements notify mechanism for systemd services which created with systemd. | |
| * | |
| * See all kinds of messages which can be sent to systemd | |
| * https://man.archlinux.org/man/sd_notify.3.en#WELL-KNOWN_ASSIGNMENTS | |
| * | |
| * @param {string} message - The message to send |
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
| // Your Slack webhook url | |
| var webhookUrl = 'https://hooks.slack.com/services/.....'; | |
| /** | |
| * Submit for forms "On form submit" event trigger (add in triggers) | |
| */ | |
| function onSubmit(e) { | |
| var formTitle = FormApp.getActiveForm().getTitle(); | |
| var formUrl = FormApp.getActiveForm().getEditUrl(); | |
| var response = e.response.getItemResponses(); |
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
| # Define a map of blocked user agents | |
| map $http_user_agent $blocked_ua { | |
| default 0; | |
| "~*AI2Bot" 1; | |
| "~*Ai2Bot-Dolma" 1; | |
| "~*Amazonbot" 1; | |
| "~*anthropic-ai" 1; | |
| "~*Applebot" 1; | |
| "~*Applebot-Extended" 1; | |
| "~*Brightbot" 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
| /** | |
| * Based on https://nextjs.org/docs/pages/building-your-application/configuring/custom-server | |
| */ | |
| /* eslint-disable @typescript-eslint/no-require-imports */ | |
| /* eslint-disable no-console */ | |
| /* eslint-disable @typescript-eslint/no-empty-function */ | |
| const { createServer } = require("node:http"); | |
| const { parse } = require("node:url"); |
NewerOlder