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
# https://medium.com/@chantastic/p-525e68f17e56 | |
p() { | |
if [[ -f bun.lockb ]]; then | |
command bun "$@" | |
elif [[ -f pnpm-lock.yaml ]]; then | |
command pnpm "$@" | |
elif [[ -f yarn.lock ]]; then | |
command yarn "$@" | |
elif [[ -f package-lock.json ]]; then | |
command npm "$@" |
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
> source /etc/profile.d/rvm.sh | |
/etc/profile.d/rvm.sh (line 45): Missing end to balance this if statement | |
if [[ -n "${rvm_bin_path}" && ! ":${PATH}:" == *":${rvm_bin_path}:"* ]] | |
^^ | |
from sourcing file /etc/profile.d/rvm.sh | |
source: Error while reading file '/etc/profile.d/rvm.sh' | |
> source /etc/profile.d/rvm.sh | bash | |
/etc/profile.d/rvm.sh (line 45): Missing end to balance this if statement | |
if [[ -n "${rvm_bin_path}" && ! ":${PATH}:" == *":${rvm_bin_path}:"* ]] | |
^^ |
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
type Parts = {BasePart} | |
local function findTopmostModelAncestor(instance: Instance): Instance? | |
local modelAncestorFound = instance:FindFirstAncestorOfClass("Model") | |
while modelAncestorFound do | |
local newModelAncestorFound = instance:FindFirstAncestorOfClass("Model") | |
if modelAncestorFound and newModelAncestorFound == nil then |
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
local Players = game:GetService("Players") | |
local characterAddedConnections: { [Player]: RBXScriptConnection } = {} | |
local function onPlayerAdded(player: Player) | |
characterAddedConnections[player] = player.CharacterAdded:Connect(function(playerChar) | |
local Humanoid = playerChar:WaitForChild("Humanoid") | |
print(playerChar.Parent, Humanoid.Parent.Parent) | |
Humanoid.WalkSpeed = 0 |
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
# src/utils.py | |
from __future__ import annotations | |
from collections import namedtuple | |
import discord | |
Author = namedtuple("Author", ["name", "url", "icon_url"]) | |
Footer = namedtuple("Footer", ["text", "icon_url"]) | |
Field = namedtuple( |
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
# Benchmarking Golang | |
2023/02/18 08:03:58 Server running at http://127.0.0.1:8000/ | |
Bombarding http://127.0.0.1:8000/ with 10000 request(s) using 100 connection(s) | |
10000 / 10000 [=============================================] 100.00% 3300/s 3s | |
Done! | |
Statistics Avg Stdev Max | |
Reqs/sec 3569.13 1184.96 8204.28 | |
Latency 28.68ms 17.66ms 135.88ms | |
HTTP codes: | |
1xx - 0, 2xx - 10000, 3xx - 0, 4xx - 0, 5xx - 0 |
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
import { useEffect, useState } from "react"; | |
const MOBILE_WIDTH = 1024; | |
export const isDesktop = (limit = MOBILE_WIDTH) => window.innerWidth > limit; | |
export const isMobile = (limit = MOBILE_WIDTH) => window.innerWidth <= limit;2 | |
const useResolutionChecker = ({ desktop, mobile }) => { | |
const [inMobileResolution, setInMobileResolution] = useState(isMobile()); |
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
["INFO" - 16:03:58] Extension Name: esbenp.prettier-vscode. | |
["INFO" - 16:03:58] Extension Version: 9.9.0. | |
["DEBUG" - 16:03:58] Local prettier module path: '/home/cyrus/Desktop/projects/cyrus01337.co.uk/node_modules/prettier/index.js' | |
["DEBUG" - 16:03:58] Using prettier version 2.7.1 | |
["DEBUG" - 16:03:58] Enabling Prettier globally | |
{ | |
"languageSelector": [ | |
{ | |
"language": "javascript" | |
}, |
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
:root { | |
--default-emoji-size: 1.375rem; | |
--default-emoji-jumboable-size: 3rem; | |
--emoji-size: calc(var(--default-emoji-size) * 2); | |
--emoji-jumboable-size: calc(var(--default-emoji-jumboable-size) * 2); | |
} | |
/* Change emoji size */ | |
[class*="messageContent"]:not([class*="repliedTextContent"]) .emoji { | |
height: var(--emoji-size) !important; |
NewerOlder