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
| <?php | |
| namespace App\Controller; | |
| use Symfony\Component\Security\Core\Role\RoleHierarchyInterface; | |
| class SecurityController extends AbstractController | |
| { | |
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
| await axios.post(`${process.env.SHERPA_BASE_URL}/oauth/v2/token`, params) | |
| .then((response)=>{ | |
| console.log(response.data) | |
| }) | |
| .catch((error) => { | |
| if (error.response) { | |
| // The request was made and the server responded with a status code | |
| // that falls out of the range of 2xx | |
| console.log(error.response.data); | |
| console.log(error.response.status); |
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
| $(document).ready(function(){ | |
| // ==== CLOSES BOOTSTRAP MODAL WITH BACK BUTTON ==== | |
| let modal = $('div.modal'); | |
| modal.on('show.bs.modal', function() { | |
| let modal = this; | |
| window.location.hash = modal.id; | |
| window.onhashchange = function() { | |
| if (!location.hash){ | |
| $(modal).modal('hide'); | |
| } |
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/sh | |
| # | |
| # REMEMBER: | |
| # give this file permissions chmod +x thisfile.sh | |
| # install s3cmd sudo apt-get s3cmd | |
| # configure s3cmd s3cmd --configure | |
| # add this file to cron crontab -e | |
| FILE=database.sql.`date +"%Y%m%d"`.gz |
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
| jQuery(function($) { | |
| $('form[data-async]').live('submit', function(event) { | |
| var $form = $(this); | |
| var $target = $($form.attr('data-target')); // Esto no lo necesito | |
| $.ajax({ | |
| type: $form.attr('method'), | |
| url: $form.attr('action'), | |
| data: $form.serialize(), //En lugar de serialize pasarlo como ajax. Que pasa con los tildes? |