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 / get-directions.html
Created November 14, 2013 04:30
Get Directions on Google Maps. Simple yet powerful code to create a form where the user can enter his location to get directions to a specific place. Very useful for contact pages.
<form action="http://maps.google.com/maps" method="get" target="_blank">
<label for="saddr">Enter your location</label>
<input type="text" name="saddr" />
<input type="hidden" name="daddr" value="350 5th Ave New York, NY 10018 (Empire State Building)" />
<input type="submit" value="Get directions" />
</form>
@carlos-sanchez
carlos-sanchez / iphone-calls-sms.html
Created November 14, 2013 04:32
iPhone calls and sms
<a href="tel:1-408-555-5555">1-408-555-5555</a>
<a href="sms:1-408-555-1212">New SMS Message</a>
@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 */
}
@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 / 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">
<time datetime=”20:00”>8pm</time>
@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>
@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 {
<?php
// Show all information
phpinfo();
?>