Skip to content

Instantly share code, notes, and snippets.

View arcanoix's full-sized avatar
:octocat:
Developer Code Now Work

Gustavo Herrera arcanoix

:octocat:
Developer Code Now Work
View GitHub Profile
@arcanoix
arcanoix / mysql_backup.sh
Created April 25, 2018 11:32 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@arcanoix
arcanoix / README.md
Created April 17, 2018 13:30 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@arcanoix
arcanoix / blog.md
Created April 6, 2018 22:18 — forked from JacobBennett/blog.md
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
@arcanoix
arcanoix / users_migration_and_database_seeder.php
Created March 22, 2018 04:38 — forked from technoknol/users_migration_and_database_seeder.php
Lumen 5.4/Laravel 5.4 Users migration and database Seeder
<?php
// Migration file
// database\migrations\create_users_table.php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
@arcanoix
arcanoix / media-query.css
Created March 16, 2018 17:20 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@arcanoix
arcanoix / template_repeater.js
Created January 29, 2018 16:39 — forked from elib0/template_repeater.js
Elementos dinámicos con jquery(Boton de agregar y eliminar los elementos)
$.on('click','.dinamic .add',function(e){
/* Elementos dinamicos. Solo es necesario agregar las clases dinamic, add y remove,
como se muestra en el ejemplo a continuacion:
<div class="dinamic">(contenedor)
<div>(elemento inicial)
<input/>
<button type="button" class="add">agregar</button>
</div>
<script class="template" type="text/x-jquery-tmpl">(plantilla de nuevo elemento)
<div>
@arcanoix
arcanoix / ScriptParaValidacionDeApiRestSOAPUI.groovy
Created November 9, 2017 10:51 — forked from edgardo001/ScriptParaValidacionDeApiRestSOAPUI.groovy
Este script permite leer una peticion del tipo json y verificar si su contenido es correcto o no, si es correcto debera escribir en disco el contenido de json.respuesta
/**
* Ref: https://community.smartbear.com/t5/SoapUI-Pro/How-to-parse-JSON-or-XML-in-Assertions/m-p/149830#M34177
* This is script assertion for reading json response and get the size of the array and print array data
* Also see the demo : https://ideone.com/Z3wyfh
**/
//VER posibles respuestas de API REST al final de este script
//Obtengo la data retornada por el servidor y la convierto en json para luego recorrerlo como un objeto
def json = new groovy.json.JsonSlurper().parseText(context.response);
@arcanoix
arcanoix / Operaciones-Git
Created October 11, 2017 11:10 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@arcanoix
arcanoix / LICENCE SUBLIME TEXT
Created October 4, 2017 22:11
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3103
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
B085E65E 2F5F5360 8489D422 FB8FC1AA
@arcanoix
arcanoix / Ajax-Instructions.md
Created September 30, 2017 11:50 — forked from msurguy/Ajax-Instructions.md
Morris bar charts with AJAX (Laravel)

Did I hear you wanted AJAX charts instead of hard coded? You got it.

Follow this guide to integrate bar chart reports into your Laravel application with AJAX. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/