Skip to content

Instantly share code, notes, and snippets.

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

Josep Viciana emmgfx

🏠
Working from home
View GitHub Profile
@emmgfx
emmgfx / gist:4538055
Created January 15, 2013 11:42
Media queries con diferentes hojas de estilos
<!-- Se aplicará medium.css si la ventana mide entre 701 y 900px -->
<link rel="stylesheet" media="screen and (min-width: 701px) and (max-width: 900px)" href="css/medium.css" />
@emmgfx
emmgfx / gist:4538027
Last active December 11, 2015 03:28
Abrir archivo remoto con PHP
<?PHP
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_URL, );
$contents = curl_exec($c);
curl_close($c);
?>
@emmgfx
emmgfx / gist:4538010
Last active December 11, 2015 03:28
Meta viewport con escalas
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@emmgfx
emmgfx / gist:4537995
Last active December 11, 2015 03:28
Transiciones para LESS
.transition(@type: All, @seconds: 0.1s, @ease: ease-in){
-webkit-transition:@type @seconds @ease;
-moz-transition:@type @seconds @ease;
-o-transition:@type @seconds @ease;
transition:@type @seconds @ease;
}
/*
USO:
@emmgfx
emmgfx / gist:4530058
Last active December 11, 2015 02:19
Comprobar si archivo remoto existe con PHP
<?PHP
function remote_file_exists($file){
$ch = curl_init($file);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($retcode==200 || $retcode==302){
return true;
}else{