Place this piece of code in .oh-my-zsh/custom/themes/<your_theme>.zsh_theme
# NODE
function node_prompt_version {
if which node &> /dev/null; then
echo "%{$fg_bold[blue]%}node(%{$fg[red]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}"
fi
Backup your home directory. To save the list of installed software use following command:
sudo dpkg --get-selections > package_list
This will create a file with a list of all pakcages/softwares that are installed on this system. You will need to backup this file to somewhere safe.
Then when you reinstall ubuntu on your machine you can use the following command to install all these software
/** | |
* Validates both phone and mobile numbers with[out] DDD and DDI | |
* valid examples: +55(11) 98888 - 8888 / 9999 - 9999 / 21 98888 - 8888 / 5511988888888 | |
*/ | |
export const regexBrazilianPhones = /^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d|[2-9])\d{3})\-?(\d{4}))$/ | |
export const regexBRMobilePhone = /^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d)\d{3})\-?(\d{4}))$/ | |
export const regexBRPhone = /^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:[2-9])\d{3})\-?(\d{4}))$/ |
export const isValidCPF = (cpf) => { | |
if (typeof cpf !== "string") return false | |
cpf = cpf.replace(/[\s.-]*/igm, '') | |
if (cpf.length !== 11 || !Array.from(cpf).filter(e => e !== cpf[0]).length) { | |
return false | |
} | |
var soma = 0 | |
var resto |
DO $$ | |
DECLARE | |
r RECORD; | |
BEGIN | |
FOR r IN | |
( | |
SELECT table_name | |
FROM information_schema.tables | |
WHERE table_schema=current_schema() | |
) |
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Remove default padding */ | |
ul[class], | |
ol[class] { |
#copy and paste or edit and run | |
cd src | |
mkdir common | |
mkdir common/components common/mixins common/directives | |
mkdir layouts | |
mkdir middlewares | |
mkdir plugins | |
mkdir services |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging |
In your current repository, create a new orphan branch, containing the contents of the first commit you want to copy:
$ git checkout --orphan -b tmpbranch <hash_of_first_commit>
$ git commit -a -m 'first commit'
Cherry-pick the rest of the commits you want: