mysql -u root -p
create database crud;
grant all on crud.* to 'usercrud'@'localhost';
exit;
mysql -u root -p crud < crud_dump.sql
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
| $scope.getPersonIdFromEmail = function (email) { | |
| var parameters = $scope.init('person/search/by-email'); | |
| parameters.email = email; | |
| var deferred = $q.defer(); | |
| $q.all([$scope.get(parameters)]).then(function (data) { | |
| /* En data irá el resultado que devuelva cada función que se le haya pasado a $q.all() */ | |
| /* Por tanto, en data[0] irá el resultado de $scope.get(parameters) */ | |
| deferred.resolve(data[0]._embedded.person[0]); | |
| }, function (data) { |
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
| /* listener for changes in uri */ | |
| appAngular.run(['$rootScope', 'ToggleMenuActive', function ($rootScope, ToggleMenuActive) { | |
| $rootScope.$on('$routeChangeSuccess', function (event, current, previous) { | |
| ToggleMenuActive.active = current.$$route.originalPath; | |
| }); | |
| }]); | |
| /* directive to change class */ | |
| angular.module('organizationDirectives', []) | |
| .directive('markAsActive', ['ToggleMenuActive', function (ToggleMenuActive) { |
Without data:
curl --data '' https://example.com/resource.cgi
curl -X POST https://example.com/resource.cgi
curl --request POST https://example.com/resource.cgi
With fields:
curl --data "param1=value1¶m2=value2" https://example.com/resource.cgi
optional:
chmod 400 /path/my-key-pair.pem
then:
ssh -i /path/my-key-pair.pem [email protected]
pandoc YOUR_DOC.md -o example13.pdf
with TOC:
pandoc --toc YOUR_DOC.md -o example13.pdf
Credits to: Jenny Louthan.
Seen at: Uncorked Studios
###Getting the file in the controller’s scope:
.directive('fileModel', ['$parse', function ($parse) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
Realiza una ejecución de un comando en cada commit para realizar la búsqueda de un bug. P.ej. git bisect run phpunit -c app MyClassTest.php
Cuando me devuelva un error, me marcará en qué commit se produjo
git bisect start
git bisect bad __hashRevisionBad__ #Hash de la revisión donde se ha detectado el fallo
git bisect good __hashRevisionGood__ #Hash de una revisión en la que los test pasaban
git bisect run __command__ #El script que ejecuta los tests
Lo que quieres compartir:
// compartes el $user y la clave para encontrarlo es 'organization_account'
$this->addReference('organization_account', $user);Recuperas lo que has compartido y lo usas
$manager->merge($this->getReference('person_account'))