Skip to content

Instantly share code, notes, and snippets.

@brutaldesign
brutaldesign / fluid-video.css
Last active October 18, 2019 07:38
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{
@brutaldesign
brutaldesign / fluid-video.js
Last active December 6, 2017 21:42
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 February 3, 2017 18:20
Minimal PHP configuration for WordPress
memory_limit = 96M
max_input_vars = 3000
max_execution_time = 120
post_max_size = 32M
upload_max_filesize = 32M
@brutaldesign
brutaldesign / zipfolder.php
Created January 28, 2017 16:27
Zip a folder
/**
* 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 August 29, 2015 14:21
Wordpress add filter locale
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 August 29, 2015 14:00
Use Bagpakk in your project
// Make sure the charset is set appropriately
@charset "UTF-8";
// Import compass if you need it
// @import "compass";
// Import bagpakk
@import "bagpakk";
// Example
@brutaldesign
brutaldesign / fluid-video.html
Last active August 29, 2015 13:57
Fluid Video HTML
<span class="fluid-video">
<iframe src="http://player.vimeo.com/video/29193046" width="500" height="281" frameborder="0"></iframe>
</span>