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
{"items":[ | |
{"name":"left-arrow","quantity":1,"repaint":false}, | |
{"name":"right-arrow","quantity":1,"repaint":false}, | |
{"name":"combo-left-thru","quantity":1,"repaint":false}] } |
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
@MyApp.module "Concerns", (Concerns, App, Backbone, Marionette, $, _) -> | |
Concerns.CompositeTableView = | |
template: "backbone/_concerns/templates/composite_table_view" | |
itemViewContainer: "tbody" | |
ui: | |
"headerRow" : "thead tr" | |
"actions" : ".actions" | |
"description" : ".description" |
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
do (Backbone) -> | |
_sync = Backbone.sync | |
Backbone.sync = (method, entity, options = {}) -> | |
_.defaults options, | |
beforeSend: _.bind(methods.beforeSend, entity) | |
complete: _.bind(methods.complete, entity) | |
sync = _sync(method, entity, options) | |
if !entity._fetch and method is "read" |
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
# doesn't work | |
# Error: /Users/ignu/code/true-app/spec/react-tests/log-activity-test.coffee: | |
# Cannot find module './log_activity' from '/Users/ignu/code/true-app/spec/react-tests/log-activity-test.coffee' | |
r = (path)-> | |
jest.dontMock path | |
require path | |
r('./log_activity') | |
# totally works fine | |
jest.dontMock('./log_activity') |
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
private void handleException(Exception e) { | |
String[] error = e.getMessage().split("Error Code - "); | |
String errorMessage = error[0]; | |
if (error.length == 2) { // error code has been supplied | |
int errorCode = Integer.parseInt(error[1]); | |
if (errorCode == 431) { | |
// ... | |
} else if (errorMessage.contains("Can't delete snapshotshot 4 due to it is not in BackedUp Status")) { | |
throw new EC2ServiceException(ClientError.IncorrectState, "Specified snapshot is not in the correct state 'completed' for deletion"); | |
} else if (errorMessage.contains("Public key is invalid")) { |
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
#!/bin/bash | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
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
cool | o | |
---|---|---|
oneaf | adsf | |
af | asdf |
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
one | two | three | yeah | |
---|---|---|---|---|
hi | bye | oh | oh |
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
$("#ui-datepicker-div").addClass("promoteZ"); | |
CSS: | |
.promoteZ { | |
z-index: 2006; /* Dialog z-index is 1006*/ | |
} |
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
def save | |
@campsite = Campsite.new(self.params[:campsite]) | |
@campsite.save! | |
redirect_to "/campgrounds/#{@campsite.name}/campsites" | |
end |
OlderNewer