Skip to content

Instantly share code, notes, and snippets.

View MrJmpl3's full-sized avatar
🏠
Working from home

José Manuel Casani Guerra MrJmpl3

🏠
Working from home
View GitHub Profile
@MrJmpl3
MrJmpl3 / ApiTrait.php
Last active July 18, 2019 13:35
ApiTrait - Trait helpers to Laravel API Resources
<?php
/**
* Copyright (c) 2018.
* Archivo desarrollado por Jose Manuel Casani Guerra bajo el pseudonimo de MrJmpl3
*
* Email: jmpl3.soporte@gmail.com
* Twitter: @MrJmpl3
* Pagina Web: https://mrjmpl3-official.es
*/
@MrJmpl3
MrJmpl3 / VDatePickerDateTableFullEvent.ts
Last active July 23, 2019 05:17
Vuetify - Full color in event date
import VDatePickerDateTable from 'vuetify/lib/components/VDatePicker/VDatePickerDateTable';
import { pad } from 'vuetify/lib/components/VDatePicker/util';
import { DatePickerFormatter } from 'vuetify/lib/components/VDatePicker/util/createNativeLocaleFormatter';
import isDateAllowed from 'vuetify/lib/components/VDatePicker/util/isDateAllowed';
export default VDatePickerDateTable.extend({
name: 'v-date-picker-date-table-full-name',
methods: {
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
genTBody() {
@MrJmpl3
MrJmpl3 / nuxt.config.js
Last active July 28, 2019 18:15
Configurar Vuetify-Loader en Nuxt (Vuetify 2.0)
const sass = require('sass');
const fibers = require('fibers');
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin');
const nodeExternals = require('webpack-node-externals');
const webpackPlugins = () => {
const plugins = [];
plugins.push(new VuetifyLoaderPlugin());
return plugins;
};
@MrJmpl3
MrJmpl3 / VTextFieldWithDense.ts
Created July 29, 2019 04:50
Vuetify 1.5 - Textfield Dense
import VTextField from 'vuetify/lib/components/VTextField/VTextField';
export default VTextField.extend({
name: 'v-text-field-with-dense',
props: {
dense: {
type: Boolean,
default: false
}
},
<template functional>
<v-navigation-drawer v-bind="data.attrs" v-on="listeners" :width="width" class="ct-navigation-drawer" app dark>
<template v-slot:img="attrs">
<v-img v-bind="attrs" gradient="to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, .8)" />
</template>
<slot />
</v-navigation-drawer>
</template>
<script>
@MrJmpl3
MrJmpl3 / CtTextField.ts
Created September 13, 2019 21:33
Applying the advice of Vuetify
import mixins from 'vuetify/src/util/mixins';
import VTextField from 'vuetify/lib/components/VTextField';
import VInput from 'vuetify/lib/components/VInput';
export default mixins(VTextField)
.extend()
.extend({
name: 'CtTextField',
props: {
dense: {
@MrJmpl3
MrJmpl3 / example.php
Created August 25, 2019 23:35
Testing Login of Laravel Passport without lose env
request()->request->add([
'grant_type' => 'password',
'client_id' => env('PASSPORT_CLIENT_ID'),
'client_secret' => env('PASSPORT_CLIENT_SECRET'),
'username' => $this->username,
'password' => $this->password,
'scope' => '*',
]);
$request = Request::create(env('APP_URL') . '/oauth/token', 'POST');
@MrJmpl3
MrJmpl3 / mixins.scss
Created September 9, 2019 04:30
Vuetify - Elevation Color
@mixin ct-elevation-color($z, $color: #000, $important: false) {
$shadow-key-umbra-opacity: rgba($color, 0.2);
$shadow-key-penumbra-opacity: rgba($color, 0.14);
$shadow-key-ambient-opacity: rgba($color, 0.12);
$shadow-key-umbra: (
0: (
0px 0px 0px 0px $shadow-key-umbra-opacity
),
1: (