Skip to content

Instantly share code, notes, and snippets.

View carlos-sanchez's full-sized avatar

Carlos Sánchez carlos-sanchez

View GitHub Profile
@carlos-sanchez
carlos-sanchez / year.html
Created November 14, 2013 15:04
Current Year.
<span id="current-year"></span>
<script type="text/javascript">
$(function(){
var date_object = new Date();
var year = date_object.getYear();
if(year < 2000) { year = year + 1900; }
$('#current-year').html(year);
});
</script>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1"> <!-- allows zoom -->
<!-- or -->
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> <!-- blocks zoom -->
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title></title>
<?php
// Show all information
phpinfo();
?>
@carlos-sanchez
carlos-sanchez / cambiar-permisos.php
Created November 14, 2013 04:41
Cambiar permisos a 777
<?php
// Script que cambia de forma recursiva los permisos de directorios y ficheros del directorio desde donde se ejecuta
$file_mod = "666";
$dir_mod = "777";
function chmodr($path, $filemode, $dirmode){
$thisfile = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
if (!is_dir($path)){
exec("chmod ".$filemode." ".$path);
} else {
@carlos-sanchez
carlos-sanchez / figure-caption.html
Created November 14, 2013 04:39
Figure & Caption
<figure>
<img src="" alt="">
<figcaption>Pie de foto</figcaption>
</figure>
<time datetime=”20:00”>8pm</time>
@carlos-sanchez
carlos-sanchez / rel-attribute.html
Created November 14, 2013 04:37
rel attribute. Values: alternate: Links to an alternate version of the document (i.e. print page, translated or mirror) author: Links to the author of the document bookmark: Permanent URL used for bookmarking help: Links to a help document license: Links to copyright information for the document next: The next document in a selection nofollow: L…
<a rel="value">
@carlos-sanchez
carlos-sanchez / video-audio.html
Last active December 28, 2015 06:59
Video & Audio.
<!-- simple audio use -->
<audio src="audio-file.ogg" controls>
</audio>
<!-- simple video use with multiple sources-->
<video controls>
<source src="video-file.mp4" type="video/mp4"/>
<source src="video-file.ogv" type="video/ogg"/>
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
<param name="movie" value="__FLASH__.SWF" />
@carlos-sanchez
carlos-sanchez / ie-conditional-calls.txt
Last active December 28, 2015 06:59
IE conditional calls. Ojo las llamadas condicionales hay que ponerlas las ultimas.
IE 10 and up DO NOT support conditional comments at all.
TARGET IE10+:
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* IE10+ specific styles go here */
}