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 sharp = require('sharp'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| // Input and Output Directories | |
| const inputDir = 'images-resized'; | |
| const outputDir = 'images-cropped'; | |
| // Ensure the output directory exists | |
| if (!fs.existsSync(outputDir)) { |
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 node_prompt_version { | |
| if which node &> /dev/null; then | |
| echo "%{$fg_bold[blue]%}node(%{$FG[129]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}" | |
| fi | |
| } | |
| PROMPT='%{$FG[198]%}%~%{$reset_color%} $(node_prompt_version)$fg[blue]%{$fg[blue]%}(%{$FG[171]%}$(git_current_branch)%{$fg[blue]%}) %{$FG[129]%}➜ ' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " |
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
| import React, { useState, useEffect } from 'react' | |
| let state = { user: { name: '' } } | |
| export const dispatch = (data) => { | |
| const { namespace, ...rest } = data | |
| state = { ...state, ...rest } | |
| window.dispatchEvent(new CustomEvent(namespace, { detail: data })) | |
| } |
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 workspacesReact = () => { | |
| const [error, setError] = useState(null) | |
| const [loading, setLoading] = useState(null) | |
| const params = useParams() | |
| const { some, shit } = location | |
| const [name, setName] = useState('') | |
| const handleWorkspacesPost = async () => { | |
| setLoading(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
| const radioGroup = e.target.closest('*[role=radiogroup]') | |
| const isDown = e.keyCode == 40 | |
| const isLeft = e.keyCode == 37 | |
| const isUp = e.keyCode == 38 | |
| const isRight = e.keyCode == 39 | |
| if (radioGroup) { | |
| const children = radioGroup.querySelectorAll('[role=radio]') | |
| const index = [...children].indexOf(e.target) | |
| const nextIndex = index + 1 == children.length ? 0 : index + 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
| .rate { | |
| width: fit-content; | |
| } | |
| .rate__star { | |
| color: var(--f-color-text-weakest); | |
| padding: var(--f-size-1); | |
| } | |
| .rate__star:hover { |
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
| $themeColours: ( | |
| "gray", | |
| "red", | |
| "orange", | |
| "yellow", | |
| "green", | |
| "teal", | |
| "blue", | |
| "cyan", | |
| "purple", |
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
| import { objects } from './objects' | |
| const createTokenObject = (obj) => { | |
| let o = {} | |
| Object.keys(obj).map((key) => { | |
| if (typeof obj[key] == "object") { | |
| o[String(key)] = createTokenObject(obj[key]) | |
| } else { | |
| o[String(key)] = { value: obj[key] } | |
| } |
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 darkFormatWrapper(format) { | |
| return function (args) { | |
| const darkTokens = [] | |
| const dictionary = { | |
| ...args.dictionary | |
| } | |
| // Strip out the dark tokens | |
| dictionary.allTokens = dictionary.allTokens.map((token) => { | |
| const { darkValue } = token; |
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
| curl -H "Authorization: bearer githubtoken" -d '{"location":"Noice"}' https://api.github.com/orgs/orgname |
NewerOlder