Skip to content

Instantly share code, notes, and snippets.

View fluid-video.css
.fluid-video{
display:block;
width: 100%;
height: 0;
padding-bottom: 56.25%; /* 16/9 format */
overflow: hidden;
position: relative;
}
.fluid-video iframe, .fluid-video embed, .fluid-video object{
View fluid-video.js
jQuery( function( $ ) {
var videoSelectors = [
'iframe[src*="player.vimeo.com"]',
'iframe[src*="youtube.com"]',
'iframe[src*="youtube-nocookie.com"]',
'iframe[src*="kickstarter.com"][src*="video.html"]',
'iframe[src*="screenr.com"]',
'iframe[src*="blip.tv"]',
'iframe[src*="dailymotion.com"]',
'iframe[src*="viddler.com"]',
@brutaldesign
brutaldesign / php.ini
Last active Feb 3, 2017
Minimal PHP configuration for WordPress
View php.ini
memory_limit = 96M
max_input_vars = 3000
max_execution_time = 120
post_max_size = 32M
upload_max_filesize = 32M
View zipfolder.php
/**
* Zip a folder
*
* @param string $src path to folder path/folder
* @param string $dest destination name path/folder.zip
* @see http://stackoverflow.com/questions/4914750/how-to-zip-a-whole-folder-using-php
*/
function zipit( $src, $dest = null ) {
// Get real path for our folder
@brutaldesign
brutaldesign / wp-add-locale.php
Last active Aug 29, 2015
Wordpress add filter locale
View wp-add-locale.php
if ( ! function_exists( 'wolf_set_lang' ) ) {
/**
* Set your language here
*
* The .pot file can be found in the languages/ folder of the parent theme
* http://help.wolfthemes.com/2013/11/translate-your-wordpress-theme/
*
* @param string $locale
* @return string
*/
@brutaldesign
brutaldesign / bagpakk-usage.scss
Last active Aug 29, 2015
Use Bagpakk in your project
View bagpakk-usage.scss
// Make sure the charset is set appropriately
@charset "UTF-8";
// Import compass if you need it
// @import "compass";
// Import bagpakk
@import "bagpakk";
// Example
View fluid-video.html
<span class="fluid-video">
<iframe src="http://player.vimeo.com/video/29193046" width="500" height="281" frameborder="0"></iframe>
</span>
You can’t perform that action at this time.