This file contains hidden or 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
'use strict'; | |
// sudo npm i --save-dev gulp-group-css-media-queries autoprefixer-stylus gulp-cssnano gulp-watch gulp-autoprefixer gulp-uglify gulp-stylus gulp-rigger gulp-minify-css gulp-csscomb gulp-imagemin gulp-sourcemaps imagemin-pngquant gulp-plumber gulp-rename vinyl-buffer browser-sync gulp.spritesmith main-bower-files gulp-filter gulp-concat gulp-base64 gulp-svg-sprite | |
var isProduction = false; | |
var gulp = require('gulp'), | |
watch = require('gulp-watch'), | |
autoprefixer = require('autoprefixer-stylus'), | |
uglify = require('gulp-uglify'), |
This file contains hidden or 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
[target=_blank][rel=noopener noreferrer] |
This file contains hidden or 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
(function(jQuery) { | |
jQuery.fn.clickoutside = function(callback) { | |
var outside = 1, self = $(this); | |
self.cb = callback; | |
this.click(function() { | |
outside = 0; | |
}); | |
$(document).click(function() { | |
outside && self.cb(); | |
outside = 1; |
This file contains hidden or 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
line-height (1.3em + (1.5 - 1.3) * (100vw - 320px) / (1200 - 320)) |
This file contains hidden or 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
font-size (16 + (24 - 16) * (100vw - 400px) / (800 - 400)) |
This file contains hidden or 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
<a href='#link'>Article text <object><a href='#nestedlink'>Nested Link</a></object></a> |
This file contains hidden or 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
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --span-hosts --execute robots=off --recursive --refer=https://google.com --user-agent="Safari" https://www.udemy.com/html-css-course |
This file contains hidden or 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 unwanted dashboard metaboxes | |
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets'); | |
function my_custom_dashboard_widgets() { | |
global $wp_meta_boxes; | |
//QuickPress | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
//Wordpress Development Blog Feed | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); |
This file contains hidden or 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 | |
/* =BEGIN: Add Class to first Paragraph in WordPress the_content(); | |
Source: http://webdevbits.com/wordpress/add-class-to-first-paragraph-in-wordpress-the_content/ | |
---------------------------------------------------------------------------------------------------- */ | |
function first_paragraph($content){ | |
// Testing to see if the content is a Page or Custom Post Type of school, if so, display the text normally (without the class = intro). | |
if ( is_page() || ('school' == get_post_type() ) ) { | |
return preg_replace('/<p([^>]+)?>/', '<p$1>', $content, 1); | |
} else { | |
return preg_replace('/<p([^>]+)?>/', '<p$1 class="intro">', $content, 1); |
This file contains hidden or 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 | |
// add to functions.php in your WordPress theme | |
add_filter('upload_mimes', 'm6z_upload_mimes'); | |
function m6z_upload_mimes($mimes = array()) | |
{ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
?> |