- https://unused-css.com: Obvious
- http://www.sitepoint.com/building-custom-twig-filter-tdd-way/ - Twig filters
- http://www.sitepoint.com/complete-guide-reducing-page-weight/ -
- http://www.sitepoint.com/show-us-books-upgrademylibrary/ - Older books champ
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS - Activate CORS
- http://knpuniversity.com/blog/upgrading-symfony-2.7
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
is_processing = false; | |
last_page = false; | |
function addMoreElements() { | |
is_processing = true; | |
$.ajax({ | |
type: "GET", | |
//FOS Routing | |
url: Routing.generate('route_name', {page: page}), | |
success: function(data) { | |
if (data.html.length > 0) { |
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
denominations_USD = [ | |
{ 'title': 'Hundred-dollar bill', 'count': 0, 'val': 10000 }, | |
{ 'title': 'Fifty-dollar bill', 'count': 0, 'val': 5000 }, | |
{ 'title': 'Ten-dollar bill', 'count': 0, 'val': 1000 }, | |
{ 'title': 'Five-dollar bill', 'count': 0, 'val': 500 }, | |
{ 'title': 'One-dollar bill', 'count': 0, 'val': 100 }, | |
{ 'title': 'Quarter', 'count': 0, 'val': 25 }, | |
{ 'title': 'Dime', 'count': 0, 'val': 10 }, | |
{ 'title': 'Nickel', 'count': 0, 'val': 5 }, | |
{ 'title': 'penny', 'count': 0, 'val': 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_filter('widget_text', 'do_shortcode'); |
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
/* | |
* Let Editors manage users, and run this only once. | |
*/ | |
function isa_editor_manage_users() { | |
if ( get_option( 'isa_add_cap_editor_once' ) != 'done' ) { | |
// let editor manage users | |
$edit_editor = get_role('editor'); // Get the user role |
- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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
for var in $(ps aux | grep ansible | awk '{print $2}'); do echo $var; sudo kill -9 $var; done |
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
<select name='monthSelect' id='monthSelect'> | |
<option value='all'>- Select a month -</option> | |
</select> | |
<select name='locationSelect' id='locationSelect'> | |
<option value='all'>- Select a location -</option> | |
</select> | |
<select name='categorySelect' id='categorySelect'> | |
<option value='all'>- Select a division -</option> |
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 | |
... | |
// START EM Custm Attribute "Teacher" search | |
/* Create a new search attribute form entry for our new Event Attribute "teacher" (#_ATT{teacher}) | |
The values are hard-coded but could probably be automatically selected | |
Add this field to the search form using an EM action. | |
nb. The action doc'd here http://wp-events-plugin.com/tutorials/adding-custom-event-search-form-fields/ | |
does not seem to exist so use the footer one for inclusion in advanced search or the header one | |
for normal search. Read the source Luke. | |
*/ |
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 | |
// Filter wp_nav_menu() to add profile link | |
add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); | |
function my_nav_menu_profile_link($menu) { | |
$myavatar = bp_core_fetch_avatar( array( | |
'item_id' => bp_loggedin_user_id(), | |
'width' => 50, | |
'height' => 50, | |
'class' => 'avatar', | |
) |