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
| # If HTTPS is required on any project, this is a simple way | |
| # of encrypting the connection without modifying the project. | |
| # Add these settings to /etc/httpd/conf/httpd.conf | |
| # Redirect HTTP requests to HTTPS and rewrite the URL | |
| Listen 80 | |
| <VirtualHost *:80> | |
| ServerName "ryver.life" | |
| ServerAlias "www.ryver.life" | |
| RewriteEngine on |
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
| LIST=... # should be a space-separated list of items | |
| for VAR in $LIST | |
| do | |
| tmux new-window -n "{name}" "{command}; /bin/bash" & | |
| done |
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
| async () => { | |
| const [activeTab] = await browser.tabs.query({ | |
| active: true, | |
| currentWindow: true, | |
| }); | |
| const response = await browser.tabs.sendMessage(activeTab.id, { | |
| greeting: "hello", | |
| }); | |
| console.log("main.js received response:", 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
| from dataclasses import dataclass, field | |
| from typing import FrozenSet | |
| @dataclass(frozen=True, eq=True) | |
| class Ingredient: | |
| id: str | |
| g_per_ml: float | |
| substitution_ids: FrozenSet[str] = field( | |
| default_factory=lambda: frozenset(), compare=False |
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 webpackConfig = require("./webpack.config.js"); | |
| module.exports = { | |
| ..., | |
| core: { | |
| builder: "webpack5", | |
| }, | |
| webpackFinal: (config) => ({ | |
| ...config, | |
| module: { |
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 colors = require('tailwindcss/colors'); | |
| /** Colors must be defined in a special format. | |
| --color-s-0: 255, 255, 255; | |
| --color-s-50: 248, 250, 252; | |
| --color-s-100: 241, 245, 249; | |
| --color-s-200: 226, 232, 240; | |
| --color-s-300: 203, 213, 225; | |
| --color-s-400: 148, 163, 184; | |
| --color-s-500: 100, 116, 139; |
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
| <script lang="ts"> | |
| type T = $$Generic | |
| interface $$Slots { | |
| default: { // slot name | |
| item: T | |
| index: number | |
| } | |
| } | |
| export let items: T[] = [] | |
| </script> |
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 path = require('path'); | |
| const postcss = require('postcss'); | |
| const preprocess = require('svelte-preprocess'); | |
| const replaceFileExtension = (filePath, newExtension) => { | |
| const { name, root, dir } = path.parse(filePath); | |
| return path.format({ | |
| name, | |
| root, | |
| dir, |
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
| from typing import Type, TypeVar | |
| T = TypeVar('T', bound='TrivialClass') | |
| class TrivialClass: | |
| # ... | |
| @classmethod | |
| def from_int(cls: Type[T], int_arg: int) -> T: | |
| # ... |
OlderNewer