Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.
Note that you need the https://brew.sh/ package manager installed on your machine.
brew install fish
#! /usr/bin/env bash | |
# Create file or directory with parent directories | |
# For a more detalied description please take a look at: | |
# https://zinovyev.net/blog/create-files-and-directories-with-parent-directories | |
HELP_MESSAGE=$(cat <<EOM | |
Create files or directories with underlying path | |
Usage Examples: |
Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.
Note that you need the https://brew.sh/ package manager installed on your machine.
brew install fish
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B) | |
set -g prefix C-space | |
unbind-key C-b | |
bind-key C-space send-prefix | |
# Set new panes to open in current directory | |
bind c new-window -c "#{pane_current_path}" | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" |
STEP 2: setup docker to run react app (dev and production) configuration: https://gist.github.com/przbadu/929fc2b0d5d4cd78a5efe76d37f891b6
Because we are using Docker
, we are not going to install node
, npm
, create-react-app
in our development machine, not even for generating create-react-app
scaffold.
For this purpose I am using 2-step docker configuration:
create-react-app
const Reader = f => | |
({ | |
run: f, | |
map: g => Reader(x => g(f(x))), | |
chain: g => Reader(x => g(f(x)).run(x)) | |
}) | |
Reader.of = x => Reader(() => x) | |
// function application |
/* | |
* Simple Publish / subscribe events routine. | |
* | |
* Used to extend an object with the subscribe and publish methods. | |
* The return value of subscribe has a remove method that can be used | |
* to unsubscribe. | |
* | |
* Modifies the object directly. | |
*/ | |
var $$ = $$ || {}; //This is the utility functions object used elsewhere. |
#!/bin/env fish | |
function cd -d "change directory, and activate virtualenvs, if available" | |
# first and foremost, change directory | |
builtin cd $argv | |
# find a parent git directory | |
if git rev-parse --show-toplevel >/dev/null ^/dev/null | |
set gitdir (realpath (git rev-parse --show-toplevel)) | |
else |
/** | |
* version1: convert online image | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example | |
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
console.log('IMAGE:',base64Img); | |
}) |
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |