This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
//Getter ${1:val} | |
public function get${1/(?:^|_)(\w)/\U$1$2/g$1}(){ | |
return \$this->${1:val}; | |
} | |
//Setter ${1:val} | |
public function set${1/(?:^|_)(\w)/\U$1$2/g$1}(\$${1:val}){ | |
\$this->${1:val} = \$${1:val}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
class ${1:className} { | |
//variable instance | |
private \$${2:val}; | |
//constructeur | |
function __construct(\$${2:val}){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//instalation sur linux | |
sudo apt-get install git | |
//for ui git in terminal | |
curl -L http://install.ohmyz.sh | sh | |
//télécharger git | |
http://git-scm.com/downloads | |
//interface pour gérer git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//========== inclure un fichier ===============// | |
include ($SERVER['DOCUMENTROOT']."/repertoire/fichier.php"); //pour référer un script PHP | |
include_once("repertoire/fichier.php"); //inclue qu'une seul fois le fichier | |
require("repertoire/fichier.php"); //cette fonction arrête le script si il n'est pas parvenue à le trouver | |
require_once("repertoire/fichier.php"); //inclue qu'une seul fois le fichier | |
/*la fonction include autorise les fichier distant | |
mais il faut mettre allow_url_fopen à on dans le fichier de config php.ini*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ma fonction formField</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*fonction qui permet de faire l'effet placeholder*/ | |
function inputEffetct(beforeColor, afterColor){ | |
/*si une personne rafréchi la page pour laisser les eléements de la même couleur*/ | |
$('input:text, input:password').each(function(){ | |
/*condition si la valeur du input n'est pas égale au value du input pour garder la bonne couleur lors du refresh de la page*/ | |
if($(this).val() != $(this).attr('value')){ | |
$(this).css('color', afterColor); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pre { | |
display: inline-block; | |
position: fixed; | |
top: 50%; | |
left: 50%; | |
padding: 30px; | |
background: #000; | |
z-index: 999; | |
height: 600px; | |
width: 30%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(preg_match('/vimeo/', $data['url'])){ | |
$url = '//player.vimeo.com/video/'.end(explode('/', $data['url'])); | |
echo "<iframe src='$url' width='560' height='315' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"; | |
echo "<img src='".unserialize(file_get_contents("http://vimeo.com/api/v2/video/".end(explode('/', $data['url'])).".php"))[0]['thumbnail_medium']."' />"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$|^(?:https?:\/\/)?(?:www\.)?dailymotion.com\/(video|hub)+(\/([^_]+))?[^#]*(#video=([^_&]+))?$|^(?:https?:\/\/)?(?:www\.)?vimeo.com\/([0-9]+)$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(preg_match('/android|blackberry|htc|iphone|ipad|ipaq|ipod|mobile/', strtolower($_SERVER['HTTP_USER_AGENT']))) { | |
$ismobile = 1; | |
} |
OlderNewer