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 { useDebounce } from 'useDebounce'; | |
| const debouncedEmail = useDebounce(email, 500); |
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
| services: | |
| vault: | |
| image: vault:1.17.5 | |
| container_name: vault | |
| restart: on-failure:10 | |
| ports: | |
| - '8200:8200' | |
| environment: | |
| VAULT_ADDR: 'http://0.0.0.0:8200' | |
| VAULT_LOCAL_CONFIG: | |
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
| #!/bin/sh | |
| UPDATE_TYPE=${1:-all} | |
| DEV_LIBS=$(poetry show --only=dev -o -T |awk '{print $1}') | |
| MAIN_LIBS=$(poetry show --only=main -o -T |awk '{print $1}') | |
| if [ "$UPDATE_TYPE" = "main" ]; then | |
| LIBS=$(poetry show --only=main -o -T |awk '{print $1}') | |
| elif [ "$UPDATE_TYPE" = "dev" ]; then |
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
| * { | |
| box-sizing: border-box; | |
| position: relative; | |
| min-width: 0; | |
| } | |
| body { | |
| min-height: 100dvh; | |
| } |
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 redis | |
| import time | |
| import uuid | |
| class RedisMutex: | |
| def __init__(self, key, host='localhost', port=6379, db=0): | |
| self.key = key | |
| self.redis = redis.Redis(host=host, port=port, db=db) | |
| self.lock_id = uuid.uuid4().hex |
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
| @patch('httpx.put') | |
| def test_update_application_basic_info(mock_put): | |
| mock_response = mock.Mock() | |
| mock_response.status_code = 200 | |
| mock_response.json.return_value = {'data': {'ec_add_on_id': 123}} | |
| mock_put.return_value = mock_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
| upstream nextjs { | |
| server localhost:3000; | |
| } | |
| server { | |
| listen 8080; | |
| server_name SUBDOMAIN1_HOST; | |
| server_tokens off; |
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 os | |
| from app.helpers import storage_path | |
| def main() -> None: | |
| link_path = storage_path('public') | |
| if os.path.exists(link_path) and os.path.islink(link_path): | |
| os.unlink(link_path) | |
| os.symlink(storage_path('app'), link_path, target_is_directory=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
| class DataFactory: | |
| counter = count(start=1) | |
| def model(self): | |
| return ApplicationCarousel | |
| def definition(self): | |
| faker = Faker() | |
| faker.add_provider(internet) | |
| return { |
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 searchObject(object, searchTerm, maxDepth, currentPath = [], currentDepth = 0) { | |
| if (currentDepth > maxDepth) { | |
| return; | |
| } | |
| for (let key in object) { | |
| try { | |
| if (key.toLowerCase().includes(searchTerm.toLowerCase())) { | |
| console.log(`Path: ${currentPath.join('.')}.${key}`); | |
| } |