- Describe the cause of the error, if possible.
- Avoid blaming the user. "You typed a URL that doesn't exist" => "We can't find any page at this URL"
- Avoid impersonal writing. "Could not upload selected files" => "We could not upload the files that you selected"
- Suggest a next action for the user if it is plausible.
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
var red = '#c00' | |
var white = '#fff' | |
console.log('<table border=0 cellspacing=0 cellpadding=0 style="line-height:10px">\n' + ([ | |
'111111111111111111', | |
'1 1 1 1', | |
'1 1 1 1 1 1 1 1', | |
'1 1 1 1 1 1 1 1', | |
'1 1 1 1 1 1 1', | |
'111111 1111111111', |
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
require.extensions[".json"] = function (module, filename) { | |
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8")) | |
} |
I suspect that some trig calculations could make this very general.
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
App.Router.map(function() { | |
this.resource('post', { path: '/posts/:post_id' }); | |
}); | |
App.PostRoute = Ember.Route.extend({ | |
model: function(params) { | |
return this.store.find('post', params.post_id); | |
} | |
}); |
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
// Rounds all the corners of a box | |
@mixin border-radius($radius, $clip: padding-box) | |
-webkit-border-radius: $radius | |
-moz-border-radius: $radius | |
-o-border-radius: $radius | |
border-radius: $radius | |
-webkit-background-clip: $clip | |
-mox-background-clip: $clip | |
-o-background-clip: $clip | |
background-clip: $clip |
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
<?php | |
/** | |
* Display point award report. | |
* | |
* Generates a list of awarded points. | |
* | |
* @return array $content | |
*/ | |
function game_report_page_points() { | |
// For some mysterious reason only parts of the db_select API is chainable. |
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
// Load Ember into the global scope by requiring it | |
require('ember'); | |
// Go have fun | |
var app = Ember.Application.create(); |
OlderNewer