Perl-inspired notation to quote strings: by using % (percent character) and specifying a delimiting character.
Any single non-alpha-numeric character can be used as the delimiter, %[including these]
, %?or these?
, %~or even these things~
.
#!/bin/sh | |
# Install node and npm via nvm - https://github.com/nvm-sh/nvm | |
# Run this script like - bash script-name.sh | |
# Define versions | |
INSTALL_NODE_VER=22 | |
INSTALL_NVM_VER=0.40.1 |
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
# rails new maverick -m https://raw.github.com/gist/4126950/ -d mysql | |
# rake rails:template LOCATION=https://raw.github.com/gist/4126950/ | |
# <------ Pre-requisits ------> | |
# Setting current directory (for loading the yml config file) | |
@current_dir = Dir.pwd.gsub("/#{app_name}", "") | |
def ask_wizard(question) | |
ask "\033[1m\033[30m\033[46m" + "prompt".rjust(10) + "\033[1m\033[36m" + " #{question}\033[0m" | |
end |