- Without ID will create a new item in a collection, and return that new item
- Without ID, with reference_id in payload will create a new item in a collection with the same attributes as the item with a matching id as the reference_id (and use any other attributes in payload as overrides), and return that new item (cloning)
- With an ID will return error code 405
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
const assignData = assign((context, { type, ...data }) => data) | |
const submissionMachine = Machine({ | |
id: 'submission', | |
initial: 'upload', | |
strict: true, | |
states: { | |
upload: { | |
on: { |
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
const assignData = assign((context, {type, ...data}) => console.log('assignData', type, data) || data) | |
const cartMachine = Machine({ | |
id: 'cart', | |
initial: 'organization', | |
strict: true, | |
states: { | |
organization: { | |
on: { |
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
const experiments = [ | |
'experiment_a', | |
'experiment_b', | |
'experiment_c', | |
] | |
const experimentStates = () => { | |
if (experiments.length) { | |
let states = {} |
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
// | |
// Square | |
// | |
@mixin make-square-grid($index, $class) { | |
.col-#{$class}-square.col-#{$class}-#{$index} { | |
margin-top: -$grid-gutter-width / 2; | |
margin-bottom: -$grid-gutter-width / 2; | |
padding-bottom: percentage(($index / $grid-columns)); |
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
@mixin media-xs { | |
@media screen and (min-width: $screen-xs-min) and (max-width: $screen-xs-max) { | |
@content; | |
} | |
} | |
@mixin media-sm { | |
@media screen and (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { | |
@content; | |
} |
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
// If you override the initialize, all that is needed to | |
// incorporate this functionality is to call | |
// `model.__super__.initialize()` in your subs constructor | |
Backbone.Model.prototype.initialize = function() { | |
this._setOriginalAttributes(); | |
return this; | |
}; | |
// | |
Backbone.Model.prototype._setOriginalAttributes = function() { |
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
Show hidden characters
[ | |
{ | |
"keys": ["super+l"], // "control+l" on non-Mac | |
"command": "show_overlay", | |
"args": { | |
"overlay": "goto", | |
"text": ":" | |
} | |
} | |
] |
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
[alias] | |
lg = log --color --graph --pretty=format:'%C(red bold)%h%Creset -%C(yellow reverse bold)%d%Creset %s %C(green bold)(%cr) %C(cyan bold)<%an>%Creset' --abbrev-commit -- | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = cyan reverse | |
local = cyan | |
remote = yellow bold |