View console-colors.js
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 createLogger = (backgroundColor, color) => { | |
const logger = (message, ...args) => { | |
if (logger.enabled === false) { | |
return; | |
} | |
console.groupCollapsed( | |
`%c${message}`, | |
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`, | |
...args |
View fish_shell_android_home.txt
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
touch ~/.config/fish/config.fish; | |
echo "set --export ANDROID $HOME/Library/Android;" >> ~/.config/fish/config.fish | |
echo "set --export ANDROID_HOME $ANDROID/sdk;" >> ~/.config/fish/config.fish | |
echo "set -gx PATH $ANDROID_HOME/tools $PATH;" >> ~/.config/fish/config.fish | |
echo "set -gx PATH $ANDROID_HOME/tools/bin $PATH;" >> ~/.config/fish/config.fish | |
echo "set -gx PATH $ANDROID_HOME/platform-tools $PATH;" >> ~/.config/fish/config.fish | |
echo "set -gx PATH $ANDROID_HOME/emulator $PATH" >> ~/.config/fish/config.fish | |
echo "set --export JAVA_HOME /Applications/Android\ Studio.app/Contents/jbr/Contents/Home;" >> ~/.config/fish/config.fish |
View HttpStatusCode.ts
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
"use strict"; | |
/** | |
* Hypertext Transfer Protocol (HTTP) response status codes. | |
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} | |
*/ | |
enum HttpStatusCode { | |
/** | |
* The server has received the request headers and the client should proceed to send the request body |
View proxy.js
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
// Simple proxy/forwarding server for when you don't want to have to add CORS during development. | |
// Usage: node proxy.js | |
// Open browser and navigate to http://localhost:9100/[url] | |
// Example: http://localhost:9100/http://www.google.com | |
// This is *NOT* for anything outside local development. It has zero error handling among other glaring problems. | |
// This started as code I grabbed from this SO question: http://stackoverflow.com/a/13472952/670023 |