Skip to content

Instantly share code, notes, and snippets.

View acacha's full-sized avatar

Sergi Tur Badenas acacha

View GitHub Profile
@acacha
acacha / adminlte_boxes.css
Created June 15, 2017 10:42
AdminLTE boxes CSS
// Box color variations
&.box-primary {
border-top-color: @light-blue;
}
&.box-info {
border-top-color: @aqua;
}
&.box-danger {
border-top-color: @red;
}
@acacha
acacha / adminlte_vue_box_component_example1.html
Created June 15, 2017 10:53
Adminlte vue cox component example
<adminlte-vue-box color='primary'></adminlte-vue-box>
<script>
export default {
data() {
return {
isCollapsed : this.collapsed,
isRemovable: this.removable,
isSolid: this.solid,
}
},
...
@acacha
acacha / adminlte_box_title_as_prop_wrong_example.html
Created June 16, 2017 10:47
Ho to use title as prop. Wrong!
<adminlte-vue-box title="My title box"></adminlte-vue-box>
@acacha
acacha / default_slot.html
Created June 16, 2017 10:56
Default slot example on vue.js
<adminlte-vue-box>Here the body content it could be simple text or HTML code!</adminlte-vue-box>
@acacha
acacha / vue_example_using_cunstom_events_on_components.html
Last active June 19, 2017 13:50
Vue example using custom events on components
<adminlte-vue-box v-on:removed="onRemoved"></adminlte-vue-box>
@acacha
acacha / watchers_with_vue_component_props.html
Created June 19, 2017 14:26
Using watcher with vue component props
watch: {
collapsed: function () {
this.isCollapsed= this.collapsed
},
...
}
@acacha
acacha / example_of_vue_methods.js
Created June 19, 2017 14:37
example_of_vue_methods.js
methods: {
remove() {
this.removed = true
this.$emmit('removed')
}
}
@acacha
acacha / example_using_watcher_vue_to_fire_events.js
Last active June 19, 2017 14:50
example_using_watcher_vue_to_fire_events.js
watch: {
removed: function () {
removed ? this.$emmit('removed') : this.$emmit('unremoved')
}
},
@acacha
acacha / check_connection_helper_for_laravel.php
Created June 20, 2017 13:19
A helper for checking connection on Laravel.
if (!function_exists('check_connection')) {
/**
* Check database connection.
*
* @param $connection
* @return bool
*/
function check_connection($connection)
{
try {