Skip to content

Instantly share code, notes, and snippets.

View coderdiaz's full-sized avatar
:electron:

Javier Diaz coderdiaz

:electron:
View GitHub Profile
@coderdiaz
coderdiaz / jquery.spin.js
Created September 25, 2015 22:09 — forked from innotekservices/jquery.spin.js
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@coderdiaz
coderdiaz / object.php
Created October 29, 2015 20:01
Obtener el tamaño de un objeto
<?php
$objeto = new StdClass;
$objeto->key1 = 0;
$objeto->key2 = 0;
$objeto->key3 = 0;
$objeto->key4 = 0;
echo count((array) $objeto);
$.each(response.errors, function(i, row) {
var fila = $('<tr/>');
$.each(row, function(name, value) {
$('<td/>', {
text: value
}).appendTo(fila);
});
fila.appendTo('#errors_in_modal');
});
@coderdiaz
coderdiaz / gist:cbda6c69ac1e8b39c4bf
Created November 4, 2015 19:33 — forked from farandal/gist:6144701
Translated default messages for the jQuery validation plugin. Spanish
/*
* Translated default messages for the jQuery validation plugin.
* Locale: ES
*/
jQuery.extend(jQuery.validator.messages, {
required: "Este campo es obligatorio.",
remote: "Por favor, rellena este campo.",
email: "Por favor, escribe una dirección de correo válida",
@coderdiaz
coderdiaz / app.js
Created February 2, 2016 22:24 — forked from jdnichollsc/app.js
SQLite plugin with ngCordova in Ionic Framework => Using service pattern (Works for litehelpers/Cordova-sqlite-storage and MSOpenTech/cordova-plugin-websql) Code => http://1drv.ms/1Ono0Ys
angular.module('Demo', ['ionic', 'Demo.controllers', 'Demo.services', 'ngCordova'])
.run(function ($ionicPlatform, sqliteService) {
$ionicPlatform.ready(function () {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
@coderdiaz
coderdiaz / routes.php
Created February 21, 2016 06:23 — forked from lukemartin/routes.php
Output checkboxes with appropriate 'checked' attributes in Laravel
Route::get('edit', function() {
// fetch our post, and it's associated categories
$post = Post::with('cats')->where('id', '=', $id)->first();
// fetch all of our categories
$cats = Cat::all();
// create our empty array
$post_cats = array();
@coderdiaz
coderdiaz / ui-datepicker.vue
Created June 22, 2016 04:35 — forked from Phunky/ui-datepicker.vue
VueJS DatePicker
<style>
.ui-datepicker .md-icon {
flex: 0 0 auto;
margin-right: 8px;
width: 18px;
height: 18px;
}
</style>
<style lang="sass" scoped>
@coderdiaz
coderdiaz / table.vue
Created October 26, 2016 19:55
VueTable
<template>
<div class="Vue__table">
<div class="VueTable panel panel-default">
<div class="panel-heading">
<div class="form-inline">
<div class="form-group pull-left">
<label class="control-label pr2">Mostrar</label>
<select class="form-control" v-model="perpage" number>
<option v-for="limit in limits" :value="limit">{{ limit }}</option>
</select>
@coderdiaz
coderdiaz / .minttyrc
Created November 28, 2016 06:27
A theme for Git Bash
BoldAsFont=-1
Transparency=low
Font=Fira Code
FontWeight=400
FontIsBold=no
FontHeight=10
FontSmoothing=full
CursorType=block
AllowBlinking=yes
BackgroundColour=13,25,38
@coderdiaz
coderdiaz / DarculaLaravel.icls
Created January 5, 2017 00:36
Custom style for Laravel Programming Style Colors
<scheme name="Darcula - Laravel" version="142" parent_scheme="Darcula">
<metaInfo>
<property name="created">2016-11-30T10:57:57</property>
<property name="ide">PhpStorm</property>
<property name="ideVersion">2016.3.0.0</property>
<property name="modified">2017-01-04T18:34:54</property>
<property name="originalScheme">_@user_Darcula</property>
</metaInfo>
<option name="LINE_SPACING" value="1.5" />
<option name="EDITOR_FONT_SIZE" value="12" />