Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergi Tur Badenas acacha

View GitHub Profile
@acacha
acacha / NUXT_FRONTEND_NOW.md
Created Dec 4, 2019
PROJECTE MOIXONET NUXT A NOW
View NUXT_FRONTEND_NOW.md
View gist:dd893315c060cb25b5c9efd2b568dbe1
# ADVANCED VUE COMPONENTS
Exemples: inheritance, compositions, associations:
- https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-aggregation-vs-composition/
- https://www.thoughtworks.com/insights/blog/composition-vs-inheritance-how-choose
- https://learn.adamwathan.com/advanced-vue/extending-components-using-composition
- ModalDialog -> Composició es pot crear ConfirmModalDialog, Announcementdialog
## COMPOSITIONS VS INHERITANCE
View LINTING.md
View aliases
alias gs="git status"
alias gl="git log"
alias gcom="git checkout master"
alias gaa="git add ."
alias gc="git commit -m "
alias gp="git push"
alias nah="git reset --hard && git clean -df"
View NOTES_MOIXONET_MOBILE.md

FLOW USUARI NORMAL

Vegeu aplicació ebando per Android. Les interfície/frontend web/nuxt si tenen gestió (creació de canals, CRUD canals i missatges, etc) però les Apps natives Android/Ios només tenen funcionailitats usuaris normals

Notes sobre seguretat:

  • Canals són públics i els missatges també: de fet no caldria usuari a la app mòbil.
  • Crides GET a la API totes públiques!!!
View LoginProxy.php
<?php
namespace Infrastructure\Auth;
use Illuminate\Foundation\Application;
use Infrastructure\Auth\Exceptions\InvalidCredentialsException;
use Api\Users\Repositories\UserRepository;
class LoginProxy
{
@acacha
acacha / init_laravel_project.sh
Last active Oct 24, 2019
Passos inicials per arrancar projecte Laravel
View init_laravel_project.sh
git clone URI_DEL_PROJECTE
cd NOM_PROJECTE
composer install
npm install
cp .env.example .env => CONFIGURAR CONNEXIÓ A BASE DE DADES I ALTRES
php artisan key:generate
php artisan migrate
@acacha
acacha / ForceUpdateComponent.vue
Created Sep 27, 2019
Force update example (Antipattern as 99% of cases is not necessary to rerender manually vue does the job)
View ForceUpdateComponent.vue
Vue.component('ParentA',{
template:`
<div id="parent-a">
<h2>Parent A</h2>
<pre>data {{ this.$data }}</pre>
<button @click="reRender">Rerender Parent</button>
<hr/>
<child-a :score="score"/>
<child-b/>
</div>`,
View game.js
var level1 = {
preload: function() {
console.log('PRELOAD')
game.load.image('wall','assets/wall.png')
game.load.image('ground','assets/ground.png')
game.load.spritesheet('player','assets/player.png', 28, 22)
},
View game.js
var level1 = {
preload: function() {
console.log('PRELOAD')
game.load.image('wall','assets/wall.png')
game.load.image('ground','assets/ground.png')
game.load.spritesheet('player','assets/player.png', 28, 22)
},