mrkeck Sharing the Love

29Nov/160

Multi-line Javascript

Turns out you can use a backtick (`) to write on multiple lines in javascript

console.log(`
This is on more
than one line
`);

Documentation

30Apr/130

PHP use / not \

When referencing folders use / instead of \
/ doesn't have to be escaped and works perfectly.

Filed under: Convention, PHP No Comments
15Dec/120

HTML Comment Convention

<!-- <Amazing Segment of Code> -->
<div id='amazing'>
     <span class='segment'>
          Code
     </span><!-- </.segment> -->
</div><!-- </#amazing> -->
<!-- </Amazing Segment of Code> -->

Basic open/close tags with some css selecting

Filed under: Convention, HTML No Comments
15Dec/120

Comment Out a Portion of Code Convention

if(0){  //Change 0 to 1 to turn on code segment
     //Code that I want to turn on and off
}
26Nov/120

CSS Convention

I've started using a new convention for my css:

body{
 width: 500px; height: 500px;
 margin: 0px; padding: 0px;
 position: absolute;
 top: 0px; left: 0px;
}

Things that have pairs like (width and height) and (margin and padding) or things that work together, I put on the same line.

Filed under: Convention, CSS No Comments