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[ | |
<pre> | |
<?php print_r(\$${1}); ?> | |
</pre> | |
]]></content> | |
<tabTrigger>pr</tabTrigger> | |
<description></description> | |
<scope>text.html.basic, punctuation.whitespace.embedded.leading.php</scope> | |
</snippet> |
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[ | |
/* =========================================== */ | |
/* MEDIA: IPHONES (RETINA) */ | |
/* =========================================== */ | |
@media only screen and (min-width : 320px) { | |
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
git ls-files --deleted -z | xargs -0 git rm |
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> | |
<!-- Example: Hello, ${1:this} is a ${2:snippet}. --> | |
<content><![CDATA[ | |
/* | |
--------------------------------------------------------------------------- | |
${1} | |
--------------------------------------------------------------------------- | |
${2} |
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
// Disable completions of HTML attributes | |
// with this option disabled, you can get attribute list completions | |
// inside opening HTML tags. | |
// WARNING: with this option disabled, Tab key expander will not | |
// work inside opening HTML attributes | |
"disable_completions": false, | |
// With this option enabled, all Emmet's CSS snippets | |
// will be available in standard auto-complete popup | |
"show_css_completions": true, |
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
/* | |
--------------------------------------------------------------------------- | |
Custom colors | |
--------------------------------------------------------------------------- | |
Sass maps are used to create an associative array that can later be | |
looped through to dynamically create a class for each item. An example | |
would be the use of the .fill-facebook class to use facebooks branding | |
as the background color or stroke of a component. |
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
/** | |
* Outline all classes. | |
*/ | |
[class] { | |
outline: 5px solid lightgrey; | |
} | |
/** | |
* Outline all BEM Elements. | |
*/ |
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
// Remove related videos from youtube embeds | |
add_filter('embed_oembed_html', 'remove_related_videos_from_yt_oembed', 10, 3); | |
function remove_related_videos_from_yt_oembed($html, $url, $args = array()) { | |
if(!stristr($html, 'youtube.com/embed/')) | |
return $html; | |
preg_match('/src="(.+?(?="))/', $html, $matches); | |
if(count($matches) >= 2 && stristr($matches[1], 'youtube.com/embed/')) | |
{ |
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 | |
function get_youtube_id( $url ) { | |
preg_match( "#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $matches ); | |
return $matches[0]; | |
} | |
// Test | |
echo get_youtube_id( "https://youtu.be/MZj1bQtRNdk" ) ); |
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
.logo-carousel { | |
height: 165px; | |
margin-bottom: 30px; | |
background-image: url("logos.png"); | |
width: 3000px; | |
background-repeat: repeat; | |
background-size: contain; | |
animation: bg-slide 170s linear infinite; | |
} |