Skip to content

Instantly share code, notes, and snippets.

Danil GoodProject

  • Russia
Block or report user

Report or block GoodProject

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@GoodProject
GoodProject / gulpfile.js
Created Apr 28, 2017 — forked from mikaelbr/gulpfile.js
Example gulpfile for complete set-up.
View gulpfile.js
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
@GoodProject
GoodProject / gulpfile.js
Created Apr 28, 2017 — forked from torgeir/gulpfile.js
Example gulpfile.js
View gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
View input:placeholder for IE9
<!--[if IE 9]>
<script type="text/javascript">
(function setPlaceHolders(){
var input = document.getElementsByTagName('input'); // get all text fields
var cls = "placeholdr"; // set name of the class
if (input) { // if fields found
for (var i=0; i < input.length; i++) {
var t = input[i];
var txt = t.getAttribute("placeholder");
View WordPress get tags
<?php
$tags = get_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<p>Tag: <a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> </p> ';
}
}
?>
<?php
$tags = wp_get_post_tags($post->ID);
View WordPress query_posts
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>
View masonry_imageloaded.js
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
View jQuery Resize Height
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
View Turn OFF Animate.css on Mobile Devices
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
.animated {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/
@GoodProject
GoodProject / functions.php
Created Oct 3, 2015 — forked from agragregra/functions.php
WordPress functions.php Must Have
View functions.php
show_admin_bar(false);
add_theme_support('post-thumbnails');
remove_action( 'wp_head', 'feed_links_extra', 3 );
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'rsd_link' );
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
View jQuery Page Preload
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
You can’t perform that action at this time.