(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
register_activation_hook(__FILE__, 'activate_my_plugin'); | |
function activate_my_plugin() { | |
// Some basic securifying | |
if ( ! current_user_can( 'activate_plugins' ) ) | |
return; | |
$plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : ''; | |
check_admin_referer( "activate-plugin_{$plugin}" ); |
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil'); | |
module.exports = function getCount (req, res) { | |
var Model = actionUtil.parseModel(req) | |
, criteria = actionUtil.parseCriteria(req); | |
Model.count(criteria, function(error, response) { | |
if (error) { | |
return res.serverError('database_error', error); |
import React from "react/addons"; | |
import m from "./m"; | |
// https://www.youtube.com/watch?v=GOiVYbWJDOA | |
export default class CyaSS extends React.Component { | |
constructor() { | |
super(); | |
this.state = { | |
hover: false, | |
active: false |
// Simple wrapper to use bootstrap's grid system to position elements side-by-side | |
var VerticalFieldsElement = React.createClass({ | |
render: function() { | |
return dom.div( | |
{ className: 'clearfix' }, | |
React.Children.map(this.props.children, function(child) { | |
if(!child) { | |
return child; | |
} |
When a beginner asks you "when do I use semi-colons?" would you rather say this?
// what people who say "use semicolons!!" say
class Foo {
prop = {
}; // yes
// give it a name so it reuses the same window | |
var win = window.open(null, "redux-devtools", "menubar=no,location=no,resizable=yes,scrollbars=no,status=no"); | |
// reload in case it's reusing the same window with the old content | |
win.location.reload(); | |
// wait a little bit for it to reload, then render | |
setTimeout(function() { | |
React.render( | |
<DebugPanel top right bottom left > |
import transitions from './transitions.css'; | |
export default () => ( | |
<ReactCSSTransitionGroup transitionName={transitions}> | |
{ ... } | |
</ReactCSSTransitionGroup> | |
); |
tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the