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
#!/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 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 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 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 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 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 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() { |
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
# Docker | |
# remove all containers | |
alias ddc='docker rm -vf $(docker ps -a -q)' | |
# remove all images | |
# alias ddi='docker rmi -f $(docker images -a -q)' | |
# ps all | |
alias dps='docker ps --all' |
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
#!/bin/bash | |
function pullImage() { | |
docker pull $1 | |
} | |
function createVolumeName() { | |
docker volume create $1 | |
} |
NewerOlder