A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer
- Composer Related
- Frameworks
- Micro Frameworks
| // includes bindings for fetching/fetched | |
| var PaginatedCollection = Backbone.Collection.extend({ | |
| initialize: function() { | |
| _.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
| typeof(options) != 'undefined' || (options = {}); | |
| this.page = 1; | |
| typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
| }, | |
| fetch: function(options) { |
| <?php | |
| /** | |
| * Example for writing a WP plugin that adds a custom post type and flushes | |
| * rewrite rules only once on initialization. | |
| */ | |
| /** | |
| * On activation, we'll set an option called 'my_plugin_name_flush' to true, | |
| * so our plugin knows, on initialization, to flush the rewrite rules. | |
| */ |
| <style> | |
| .icon { | |
| background: #33CC00; | |
| background-image:url(http://www.cyberdesignz.com/blog/wp-content/uploads/2009/12/CSS.png); | |
| background-repeat:no-repeat; | |
| background-position:center; | |
| background-size:100%; | |
| width: 128px; | |
| height: 128px; | |
| border-radius: 19px; |
| <?php | |
| /* | |
| Plugin Name: Homepage Settings for BigBang | |
| Plugin URI: http://www.inboundnow.com/ | |
| Description: Adds additional functionality to the big bang theme. | |
| Author: David Wells | |
| Author URI: http://www.inboundnow.com | |
| */ | |
| // Specify Hooks/Filters |
| There are 3 Methods for using a SSD as cache. | |
| dm-cache, bcache,enhance-io all three should be avaliable in Kernel Version 3.10. | |
| Performance differenceses are discussed here => http://lkml.indiana.edu/hypermail/linux/kernel/1306.1/01246.html | |
| In this tutorial I will use bcache since dm-cache didn't worked for me. | |
| At the moment there is only an rc5 candidate for kernel 3.10.0 | |
| How to compile it is explained below. If you have a newer kernel than 3.10 and it is bcache enabled you dont need to compile it by yourself. In this case just jump over the kernel-compile-exlanation. If your kernel is compiled with bcache support you can test with "modprobe bcache". If that doesnt throw an error it should work :) | |
| I will link to the tutorials I used. If you found better ones please paste a link in the comments | |
| How to compile a kernel by yourself is explained at: | |
| => http://bodhizazen.net/Tutorials/kernel |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
| // This leaks insane amounts of memory | |
| var fetchCallback = function(resolve, reject) { | |
| resolve({'some':'test'}) | |
| } | |
| var fetch = function() { | |
| return new Promise(fetchCallback) | |
| } | |