Skip to content

Instantly share code, notes, and snippets.

@preshetin
preshetin / Status.vue
Last active May 22, 2017 20:07
VueJS Status Component Example
<template>
<a v-if="isToggable" :class="getClass" @click.prevent="toggle">
{{ status }}
<i v-if="loading" class="fa fa-spinner fa-spin icon-resize-small"></i>
</a>
<span v-else :class="getClass">{{ status }}</span>
</template>
<script>
export default {
...
{{-- Status label with just label html formatting --}}
<status value="{{ $model->status }}"></status>
{{-- Optionally a toggle URL may be added --}}
<status value="{{ $model->status }}" toggleUrl="{{ url('status/toggle') }}"></status>
...
{
new: "bg-green",
done: "bg-gray",
visible: "bg-blue",
invisible: "bg-gray",
pending: "bg-yellow",
success: "bg-green",
active: "bg-green",
inactive: "bg-red"
};
@preshetin
preshetin / .vimrc
Created September 26, 2017 09:35
My .vimrc
syntax enable
let mapleader = ',' "The default leader is \, but the comma is much better"
set number "turn on line numbers"
"-------------Visuals---------------"
colorscheme atom-dark
set guifont=Fira_Code:h13
set linespace=15
[
{
keyword: 'additionalProperties',
dataPath: ".functions['someFunc'].events[0]",
schemaPath: '#/properties/functions/patternProperties/%5E%5Ba-zA-Z0-9-_%5D%2B%24/properties/events/items/anyOf/0/additionalProperties',
params: { additionalProperty: 'http' },
message: 'should NOT have additional properties'
},
{
keyword: 'additionalProperties',