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
#!/bin/bash | |
# | |
# Recursive chmod for directories and files. | |
# | |
# all directories within the current path to 755 (-rwxr-xr-x) | |
find . -type d -exec chmod 755 {} \; | |
# all files within the current path to 644 (-rw-r--r--) |
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
#!/bin/bash | |
# | |
# Find files containing a string | |
# | |
grep -rnw /path/to/search/ -e "<PATTERN>" |
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
# get CONTAINER_ID with 'docker ps' | |
docker exec -it <CONTAINER_ID> bash | |
# or with docker-compose | |
docker-compose exec <CONTAINER_NAME> bash |
// replace á per a; ñ per n etc
normalizeDiacriticalMarks = (string) => {
return string.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}
// remove all character are not hypen minus ("-"), space or in the range a-z
sanitize = (string) => {
string = this.normalizeDiacriticalMarks(string);
return string.replace(/[^\u002D\u0020\u0061-\u007A]/gi, '');
- Install Phalcon Developer Tools
- From PhpStorm browse to View > Tool Windows > Project
- From the contextual menu of External Libraries click on Configure PHP Include Paths...
- Under the Include Path area click to add the path to phalcon/devtools/ide
Especially useful for Ubuntu derivatives.
In order to change some Linux distribution information modify /etc/lsb-release
file.
An example:
DISTRIB_ID="elementary"
DISTRIB_RELEASE=0.4
DISTRIB_CODENAME=loki
crontabs could not be executed if environment variables are missing. To check it:
* * * * * env > /tmp/env.output
Check the environments in the output file. Every binary that is executed by a job in the crontab should be accesible by them, if not fix missing symbolic links or add the missing environment variables before the job execution. Example:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
0 1 * * * my_command
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
export const ANIMAL_TYPES = [ | |
{ | |
text: 'Perros', | |
value: 1, | |
}, | |
{ | |
text: 'Gatos', | |
value: 2, | |
}, | |
]; |
OlderNewer