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 * as z from 'zod'; | |
| const LocalStorageSchema = z.object({ | |
| name: z.string(), | |
| age: z.number(), | |
| isEmployed: z.boolean(), | |
| }); | |
| type LocalStorageData = z.infer<typeof LocalStorageSchema>; |
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
| <img | |
| referrerpolicy="no-referrer" | |
| src="link-to-image" | |
| /> |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Attach to Node", | |
| "port": 9229, | |
| "request": "attach", | |
| "skipFiles": ["<node_internals>/**"], | |
| "envFile": "${workspaceFolder}/.env", | |
| "type": "node" |
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/bash | |
| function ss() { | |
| local screenName="$1" | |
| if [ -z "$screenName" ]; then | |
| echo "No service name provided." | |
| exit 1 | |
| fi | |
| local isScreenRunning=$(screen -ls | grep -ciw "$screenName") |
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
| type Listener<Args extends Array<any>> = (...args: Args) => void; | |
| class MyEmitter<EventMap extends Record<string, Array<any>>> { | |
| private eventListeners: { | |
| [K in keyof EventMap]?: Set<Listener<EventMap[K]>>; | |
| } = {}; | |
| constructor() {} | |
| on<K extends keyof EventMap>( |
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 locale = { | |
| 'en_us': { | |
| hello: 'hello', | |
| greetings: { | |
| morning: 'Good Morning', | |
| evening: 'Good Evening', | |
| else: { | |
| foo: 'bar' | |
| } | |
| }, |
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
| find . -name "node_modules" -type d -prune | xargs du -chs # to check how much space node_modules is taking | |
| find . -name "node_modules" -type d -prune | xargs rm -rf # to remove node_modules |
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
| installer.aggregate_targets.each do |aggregate_target| | |
| aggregate_target.user_project.native_targets.each do |target| | |
| target.build_configurations.each do |config| | |
| config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(SDKROOT)/usr/lib/swift', '$(inherited)'] | |
| end | |
| end | |
| aggregate_target.user_project.save | |
| end |
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 Related Settings | |
| "editor.wordWrap": "off", | |
| "editor.cursorStyle": "line", | |
| "editor.lineNumbers": "relative", | |
| "editor.autoClosingQuotes": "always", | |
| "editor.suggestSelection": "first", | |
| "editor.autoClosingBrackets": "always", | |
| "editor.autoSurround": "languageDefined", | |
| "editor.defaultFormatter": "dbaeumer.vscode-eslint", |
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 Node { | |
| constructor(value) { | |
| this.value = value | |
| this.left = null | |
| this.right = null | |
| } | |
| } | |
| class Tree { | |
| constructor() { |