layout | author | title | revision | version | description |
---|---|---|---|---|---|
default |
mattmc3 |
Modern SQL Style Guide |
2019-01-17 |
1.0.1 |
A guide to writing clean, clear, and consistent SQL. |
This extension was developed as part of the jsonapi module for Drupal.
The JSON API specification is agnostic about how a server implements filtering strategies. In fact, the spec says:
Note: JSON API is agnostic about the strategies supported by a server. The
filter
query parameter can be used as the basis for any number of filtering strategies.
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
- nylas/N1 💌 An extensible desktop mail app built on the modern web.
- black-screen/black-screen A terminal emulator for the 21st century.
- shockone/black-screen A terminal emulator for the 21st century.
- ptmt/react-native-macos React Native for macOS
- docker/kitematic Visual Docker Container Management on Mac & Windows
- kitematic/kitematic Visual Docker Container Management on Mac & Windows
- davezuko/wirk-starter Get started with React, Redux, and React-Router!
- TelescopeJS/Telescope 🔭 An open-source social news app built with Meteor & React
- coryhouse/react-slingshot React + Redux starter kit / boile
### install php 7 ### | |
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y | |
### install laravel ### | |
composer global require "laravel/installer" | |
### install requirements ### | |
sudo apt install php-gd php-zip phpunit php-mbstring | |
### new project ### |
<?php | |
// credit: ChromeOrange - https://gist.github.com/ChromeOrange/10013862 | |
add_filter( 'woocommerce_package_rates' , 'patricks_sort_woocommerce_available_shipping_methods', 10, 2 ); | |
function patricks_sort_woocommerce_available_shipping_methods( $rates, $package ) { | |
// if there are no rates don't do anything | |
if ( ! $rates ) { | |
return; | |
} | |
//events - a super-basic Javascript (publish subscribe) pattern | |
var events = { | |
events: {}, | |
on: function (eventName, fn) { | |
this.events[eventName] = this.events[eventName] || []; | |
this.events[eventName].push(fn); | |
}, | |
off: function(eventName, fn) { | |
if (this.events[eventName]) { |
.education-pro-home #genesis-responsive-slider { | |
max-width: 100%; | |
} | |
.education-pro-home .flexslider { | |
max-width: 100%; | |
} | |
.education-pro-home .flexslider .slides img { | |
width: 100%; |
#Understanding MVC And MVP (For JavaScript & Backbone Developers)
Before exploring any JavaScript frameworks that assist in structuring applications, it can be useful to gain a basic understanding of architectural design patterns. Design patterns are proven solutions to common development problems and can suggest structural paradigms to help guide us in adding some organization to our application.
I think patterns are exciting as they're effectively a grass roots effort that build upon the collective experience of skilled developers who have previously faced similar problems as we do now. Although developers 10 or 20 years ago may not have been using the same programming languages for implementing patterns, there are many lessons we can learn from their efforts.
In this section, we're going to review two popular patterns - MVC and MVP. The context of our exploration will be how these patterns are related to the popular JavaScript framework Backbone.js, which will be explored in greater detail later on.