Skip to content

Instantly share code, notes, and snippets.

View adnen-chouibi's full-sized avatar

adnen chouibi adnen-chouibi

View GitHub Profile
1. fabpot (13338)
2. weaverryan (2626)
3. bschussek (1707)
4. Seldaek (777)
5. vicb (724)
6. kriswallsmith (693)
7. schmittjoh (636)
8. stof (444)
9. Tobion (424)
10. pborreli (353)
php symfony i18n:extract frontend ar --auto-save
if (preg_match('/youtube\.com\/watch\?v=([^\&\?\/]+)/', $url, $id)) {
$values = $id[1];
} else if (preg_match('/youtube\.com\/embed\/([^\&\?\/]+)/', $url, $id)) {
$values = $id[1];
} else if (preg_match('/youtube\.com\/v\/([^\&\?\/]+)/', $url, $id)) {
$values = $id[1];
} else if (preg_match('/youtu\.be\/([^\&\?\/]+)/', $url, $id)) {
$values = $id[1];
} else {
// not an youtube video
$(window).bind("load resize", function() { var fluid = $(".container").width();    $(".container img").width(fluid).height("auto");   });