Skip to content

Instantly share code, notes, and snippets.

@rjz
rjz / cs-jq-plugin-template.coffee
Created Sep 3, 2012
Coffeescript jQuery Plugin Class Template
View cs-jq-plugin-template.coffee
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@bueltge
bueltge / attachment-taxononimies.php
Created Dec 6, 2012
WordPress Attachment Taxonomies with WP 3.5*
View attachment-taxononimies.php
<?php
/**
* Plugin Name: Attachment Taxonomies
* Plugin URI: attachment_taxonomies
* Text Domain: addquicktag
* Domain Path: /languages
* Description:
* Version: 1.0.0
* Author: Frank Bültge
* Author URI: http://bueltge.de
@Warry
Warry / Article.md
Created Dec 11, 2012
How to make faster scroll effects?
View Article.md

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@danstefancu
danstefancu / wordpress-live-templates
Last active Jun 7, 2019
PhpStorm WordPress Live Templates
View wordpress-live-templates
PhpStorm WordPress Live Templates