Skip to content

Instantly share code, notes, and snippets.

View vaporic's full-sized avatar
馃彔
Working from home

Hugo Epinosa vaporic

馃彔
Working from home
View GitHub Profile
@vaporic
vaporic / zsh.md
Created September 18, 2016 05:10 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@vaporic
vaporic / social-share.html
Created September 15, 2016 13:29
Social Buttons Share
<div class="newSocials">
<ul>
<li>
<a href="https://plus.google.com/share?url=<?php the_permalink();?>" target="blank"><i class="fa fa-google-plus"></i></a>
</li>
<li>
<a class="" href="http://twitter.com/share?url=<?php the_permalink();?>&text=<?php the_title();?> on <?php bloginfo('name')?>" target="_blank"><i class="fa fa-twitter"></i></a>
</li>
<li>
<a class="" href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php the_title(); ?>" target="blank"><i class="fa fa-facebook"></i></a>
@vaporic
vaporic / slugify.js
Created August 4, 2016 16:16
Slugify Function
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}
@vaporic
vaporic / cors-laravel.md
Last active March 22, 2021 11:26
CORS Laravel 5.1

Activar CORS Laravel 5.1

Para activar los CORS se edita el archivo /bootstrap/app.php

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS');
header('Access-Control-Allow-Credentials: true');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization");
if($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
@vaporic
vaporic / server.js
Created July 14, 2016 19:05
Server express js
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('Hola mundo!');
});
app.listen(3000, function(err){
if(err) return console.log('Hubo un error'), process.exit(1);
@vaporic
vaporic / visor-archivos-online.md
Last active July 29, 2016 06:38 — forked from izazueta/visor-archivos-online.md
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
@vaporic
vaporic / default_option_laravel.php
Created July 7, 2016 04:01
Default option in select Laravel
{!! Form::select('mark', ["" => "Selecciona una marca"] + App\Models\Marcas::lists('mark', 'id')->all(), (isset($cars)) ? $cars->marca->id : null, ['class' => 'form-control car_mark']) !!}
@vaporic
vaporic / cursos.md
Last active February 29, 2016 05:56
Pr贸ximos Cursos

Software Engineering Useful Resources

@vaporic
vaporic / reset.css
Created February 7, 2016 14:04 — forked from marulango/reset.css
Hoja de estilo para eliminar inconsistencias a trav茅s de navegadores
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,