Skip to content

Instantly share code, notes, and snippets.

View imcarlosdev's full-sized avatar
🏠
Working from home

Carlos Maldonado imcarlosdev

🏠
Working from home
View GitHub Profile
@imcarlosdev
imcarlosdev / README.md
Created December 31, 2018 08:28 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@imcarlosdev
imcarlosdev / media-query.css
Created October 24, 2018 16:32 — 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
function parseVideo (url) {
// - Supported YouTube URL formats:
// - http://www.youtube.com/watch?v=My2FRPA3Gf8
// - http://youtu.be/My2FRPA3Gf8
// - https://youtube.googleapis.com/v/My2FRPA3Gf8
// - Supported Vimeo URL formats:
// - http://vimeo.com/25451551
// - http://player.vimeo.com/video/25451551
// - Also supports relative URLs:
// - //player.vimeo.com/video/25451551
@imcarlosdev
imcarlosdev / get_video_by_url.php
Created August 8, 2017 20:07 — forked from jonasmello/get_video_by_url.php
Convert Youtube or Vimeo url to iframe
<?php
function get_video_by_url($url, $params = null)
{
if (!is_string($url)) return false;
$regexVM = '~
# Match Vimeo link and embed code
(?:<iframe [^>]*src=")? # If iframe match up to first quote of src
(?: # Group vimeo url
@imcarlosdev
imcarlosdev / PDO PHP Class
Created January 17, 2016 19:26 — forked from geoffreyhale/PDO PHP Class
Roll Your Own PDO PHP Class
<?php
/**
* http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/
*/
?>
@imcarlosdev
imcarlosdev / jsonp.js
Created November 24, 2015 01:30 — forked from appastair/jsonp.js
Cross-domain JSONP Example (jQuery/PHP)
jQuery(function($){
$.ajax({
type: 'GET',
url: '//remote.org/jsonp.php',
data: {
field: 'value'
},
dataType: 'jsonp'
crossDomain: true,
}).done(function(response){
@imcarlosdev
imcarlosdev / Extraer variables con php
Last active December 18, 2015 05:28
Extraer variables enviadas por el navegador
<?php
extract($_GET);
extract($_POST);
?>
@imcarlosdev
imcarlosdev / dabblet.css
Created October 9, 2012 17:14
box-shadow vs filter: drop-shadow 2
/**
* box-shadow vs filter: drop-shadow 2
*/
body {
background: #ddd;
font: 16px/1 sans-serif;
margin: 50px;
}