You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rails & Trix: Add Underline, Superscript, and Subscript
Rails & Trix: Add Underline, Superscript, and Subscript
This guide will walk you through adding some extra features such as the ability to underline your text, or enhance your content by adding superscripts or subscripts for annotations or Math equations.
Prerequisites: Instruction guide assumes that you have created a Rails application and installed ActionText.
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
This file contains 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
This file contains 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
The Joy of Composition - Why stateless rendering is pure bliss
This is a proposal for a lightning talk at the Reactive 2015 conference.
NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!
The Joy of Composition
Why stateless rendering is pure bliss
React just got stateless components,
meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Punctuation
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
This file contains 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
Last active
August 29, 2015 13:58— forked from ah3rz/WineGraph
This file contains 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
The significant functional differentiation of Neo4j in the retail space is the ability to quickly traverse interconnected datasets and make recommendations in “real time”. Competing approaches require large batch processing activities done offline to compute recommendations against large aggregate datasets, usually as nightly routines. Others attempt to parameterize or profile products and users, leaving the connection of interests and products simply to keyword matching and categorization. These methods produce results that can quickly become stale and outdated if they are not done frequently and lack flexibility and capabilities to dynamically change .
When Active Record Child Objects are Autosaved in Rails
belongs_to:
Assigning an object to a belongs_to association does not automatically save the object. It does not save the associated object either.
has_one:
When you assign an object to a has_one association, that object is automatically saved (in order to update its foreign key).
In addition, any object being replaced is also automatically saved, because its foreign key will change too
If either of these saves fails due to validation errors, then the assignment statement returns false and the assignment itself is cancelled.
If the parent object (the one declaring the has_one association) is unsaved (that is, new_record? returns true) then the child objects are not saved. They will automatically when the parent object is saved.
Example for Ansible git-module and ssh agent forwarding
This file contains 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