Skip to content

Instantly share code, notes, and snippets.

View gurudeb's full-sized avatar
🕺
Eat.Sleep.Code.Repeat

Pankaj Mondal gurudeb

🕺
Eat.Sleep.Code.Repeat
View GitHub Profile
@gurudeb
gurudeb / youtube_id_regex.php
Created October 2, 2018 14:00 — forked from ghalusa/youtube_id_regex.php
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@gurudeb
gurudeb / bootstrap-3-right-offset.css
Created August 11, 2016 18:35
Bootstrap 3 offset on right
.col-xs-offset-right-12 {
margin-right: 100%;
}
.col-xs-offset-right-11 {
margin-right: 91.66666667%;
}
.col-xs-offset-right-10 {
margin-right: 83.33333333%;
}
.col-xs-offset-right-9 {
@gurudeb
gurudeb / mixins.scss
Created November 7, 2015 07:47 — forked from AlexPashley/mixins.scss
SASS: Mixins for CSS
/* MIXINs */
@mixin transition( $val : ease 0.5s ) {
-webkit-transition: $val;
-moz-transition:$val;
-o-transition:$val;
-ms-transition:$val;
transition:$val;
}
@mixin text-shadow( $top: 3px, $left: 3px, $blur: 3px , $colour: #333 ) {
@gurudeb
gurudeb / dl-file.php
Created May 8, 2016 09:27 — forked from hakre/dl-file.php
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+