CTRL + A : Move the cursor to the beginning of the line
CTRL + E : Move the cursor to the end of the line
OPTION + Left Arrow : Move the cursor one word backward
OPTION + Right arrow : Move the cursor one word forward
Left Arrow : Move the cursor one character backward
Right Arrow : Move the cursor one character forward
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 | |
| # Credits to https://gist.github.com/phette23/5270658 for inspiration | |
| # https://superuser.com/a/599156 | |
| function setTabname { | |
| echo -ne "\033]0;"$*"\007" | |
| } | |
| # set the title using above declared function and set the color of |
- The
array.filtermethod which is a higher order function which means it takes a function as it's argument.
const someArray = ['😁', '💀', '💀', '💩', '💙', '😁', '💙'];
const getUniqueValues = (array) => (
array.filter((currentValue, index, arr) => (
arr.indexOf(currentValue) === index
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 | |
| echo "[-] Installing webhook.." | |
| wget https://github.com/adnanh/webhook/releases/download/2.6.11/webhook-linux-amd64.tar.gz | |
| tar -xvf webhook*.tar.gz | |
| sudo mv webhook-linux-amd64/webhook /usr/local/bin | |
| rm -rf webhook-linux-amd64* | |
| echo "[ok] Installing webhook." |
Everything you need for customizing your git prompt in oh-my-zsh
printandechocommands for all functions in thegitplugin. Printing and echoing because then i can check what values are outputted. Massively helpful when creating a theme.- a list of all the variables that you can use to customize
$(git_prompt_info), thanks to vergenzt
grep -o "ZSH_THEME_GIT_[A-Z_]\+" lib/git.zsh| sort | uniqI think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.
Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.
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: '3' | |
| services: | |
| app: | |
| image: nginx:alpine | |
| ports: ["80:80"] | |
| restart: unless-stopped | |
| restarter: | |
| image: docker:cli | |
| volumes: ["/var/run/docker.sock:/var/run/docker.sock"] |
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
| # Install tmux on rhel/centos 7 | |
| # What do we want? | |
| libeventversion=2.1.11 | |
| tmuxversion=3.1 | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel | |
| # DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL |
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 | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| # | |
| # >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
| # >>> Kept here for legacy purposes | |
| # | |
| osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
| osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
| osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |