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
#in /etc/nginx/sites-available/sample.dev | |
#replace or add these lines | |
location / { | |
index index.php index.html; | |
try_files $uri $uri/ /index.php?url=$uri&$args; | |
} |
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
#for add font size or color | |
# subtitle shape: | |
#3 | |
#00:02:31,570 --> 00:02:35,829 | |
#Lorem ipsum dolor | |
#Find what | |
[0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} --> [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}\n | |
#Replace with | |
$0<font color="#FFFF00"> |
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
#in homestead | |
$ cd ~/Code | |
$ cd mkdir my-wordpress-project | |
$ cd my-wordpress-project | |
$ composer require johnpbloch/wordpress | |
# in homestead.yaml | |
sites: | |
- map: my-project.dev | |
to: /home/vagrant/Code/my-wordpress-project/wordpress |
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
$('input[maxlength]').on('keyup',function(){ | |
var max = $(this).attr('maxlength'); | |
var currentLength = $(this).val().length; | |
return max <= currentLength; | |
}); |
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
/* | |
|-------------------------------------------------------------------------- | |
| Run The Artisan Application | |
|-------------------------------------------------------------------------- | |
| | |
| When we run the console application, the current CLI command will be | |
| executed in this console and the response sent back to a terminal | |
| or another output device for the developers. Here goes nothing! | |
| | |
*/ |
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
# On homestead | |
$ cd Code | |
$composer create-project johnpbloch/wordpress project-name | |
# Set a local domain in host file | |
192.168.10.10 project-name.dev | |
# Update Hometead.yaml | |
sites: | |
- map: project-name.dev | |
to: /home/vagrant/Code/project-name/wordpress | |
# in terminal |
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
ir a https://console.developers.google.com/project/_/apiui/apis/library | |
crear credenciales > ID de Cliente OAUTH | |
Origines de JS autorizados = http://domain.com | |
URL de redireccionamiento autorizados = http://domain.com/g-callback | |
Copiar credenciales en .env de laravel |
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
class TheAttribute | |
{ | |
public function __get($name) | |
{ | |
$name = array_map('ucfirst', explode('_', $name)); | |
$name = implode($name); | |
# use echo instead return if is not a framework | |
return $this->{'get' . $name . 'Attribute'}(); | |
} |
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
created: function () { | |
window.addEventListener('keyup', (event)=> { | |
if (event.keyCode === 27) { | |
this.showEditor = false; | |
} | |
}); | |
}, |
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
chown www-data:www-data -R * # Let Apache be owner | |
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x | |
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- |
OlderNewer