This file contains hidden or 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
As soon as you're tempted to explain code with a comment, extract the logic into a new method. | |
Life is so much better when you do. | |
- Nathan Hopkins @hopsoft |
This file contains hidden or 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
{ | |
asi : true, // if automatic semicolon insertion should be tolerated | |
bitwise : true, // if bitwise operators should not be allowed | |
boss : true, // if advanced usage of assignments should be allowed | |
browser : true, // if the standard browser globals should be predefined | |
couch : true, // if CouchDB globals should be predefined | |
curly : true, // if curly braces around all blocks should be required | |
debug : true, // if debugger statements should be allowed | |
devel : true, // if logging globals should be predefined (console, | |
// alert, etc.) |
This file contains hidden or 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
package main | |
import ("net/http" ; "io") | |
func hello(res http.ResponseWriter, req *http.Request) { | |
res.Header().Set( | |
"Content-Type", | |
"text/html", | |
) | |
io.WriteString( |
This file contains hidden or 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
# thanks to railscasts | |
class Object | |
# macvim | |
def mvim(method_name) | |
file, line = method(method_name).source_location | |
`mvim #{file} +#{line}` | |
end | |
# sublime text |
This file contains hidden or 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
11:21:12,774 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "atlas-knob.yml" | |
11:21:13,285 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."atlas-knob.yml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."atlas-knob.yml".PARSE: Failed to process phase PARSE of deployment "atlas-knob.yml" | |
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.x.incremental.260.jar:7.x.incremental.260] | |
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] | |
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA] | |
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29] | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool |
This file contains hidden or 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
/* API method to get paging information */ | |
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) | |
{ | |
return { | |
"iStart": oSettings._iDisplayStart, | |
"iEnd": oSettings.fnDisplayEnd(), | |
"iLength": oSettings._iDisplayLength, | |
"iTotal": oSettings.fnRecordsTotal(), | |
"iFilteredTotal": oSettings.fnRecordsDisplay(), |