1.Alfred launch script to toggle displays true tone
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 { useState } from "react" | |
export default function useToggle(defaultValue) { | |
const [value, setValue] = useState(defaultValue); | |
function toggleValue(value) { | |
setValue(currentValue => | |
typeof value === "boolean" ? value : !currentValue | |
) | |
} |
Here there are some scripts to install automatically all my applications and settings on a fresh OSX machine
- Note 1: not all the applications have a cask install, therefore they must be installed automatically
- Note 2: it's better to install Xcode first from the app store before running the bootstrap script. Otherwise, Homebrew can't access the Xcode libraries as the agreement hasn't been accepted yet.
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
enable disable wifi | |
networksetup -setairportpower en0 on (or off) |
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 volume down -v ( address to just one volume ) |
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
**Check how much memory | |
find . -name "node_modules" -type d -prune | xargs du -chs | |
- example output: | |
252M ./jotto-hooks/node_modules | |
410M ./tempBin/refugee-job-search-frontend-user/node_modules | |
415M ./Magic-League/node_modules | |
72M ./legal-block-backend/node_modules |
Build docker Image Push docker Image Create a deployment on kubectl kubectl create deployment <name_app> --image=<repo_name>: Expose service kubectl expose deployment/<name_app> --type=NodePort --port=NNNN --name=<name_app>-service --target-port=NNNN
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 dateString = '20/12/2019' | |
const convertedDate = date.toISOString(dateString) |
NewerOlder