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
<meta http-equiv="Refresh" content="5;url=http://www.w3schools.com" /> |
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
// Self invoking function, use $ for referencing jQuery so the $ don't clash with other libraries | |
(function($){ | |
})(jQuery); |
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
// Custom directive controller | |
app.directive("productPanels", function(){ | |
return { | |
restrict: 'E', | |
templateUrl: 'product-panel.html' | |
controller: function() { | |
// Controller logic | |
}, | |
controllerAs: 'panels' |
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.controller("ProductController", function(){ | |
this. | |
}); |
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
// Custem element directive | |
app.directive("productDescription", function(){ | |
return { | |
restrict: 'E', | |
templateUrl: 'product-description.html' | |
}; | |
}); |
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
/*Reset file*/ | |
/* ===== Colors ===== */ | |
/*Design, layout*/ | |
$green: #18bc9c; | |
$green-darker: darken(#11866f, 2%); | |
$orange: #ffa800; | |
$orange-light: #ffb629; | |
$orange-medium: darken($orange, 5%); | |
$orange-dark: darken($orange, 10%); |
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 Misc | |
================================================================================================ | |
Difference between two dates | |
$date1 = new DateTime('2007-03-24'); | |
$date2 = new DateTime('2009-06-26'); | |
$interval = $date1->diff($date2); | |
echo 'difference: ' . $interval->y . ' years, ' . $interval->m.' months, '.$interval->d.' days '; | |
--- | |
Trim ending slashes |
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
/*Reset file*/ | |
/* ===== Colors ===== */ | |
/*Design, layout*/ | |
@green: #18bc9c; | |
@green-darker: darken(#11866f, 2%); | |
@orange: #ffa800; | |
@orange-light: #ffb629; | |
@orange-medium: darken(@orange, 5%); | |
@orange-dark: darken(@orange, 10%); |
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 | |
$images = array( | |
'logo.png', | |
'background.jpg', | |
'http://www.hardcoregamer.com/wp-content/uploads/2014/03/BAK_Sshot019.jpg' | |
); | |
foreach ($images as $image) { | |
$src = (substr($image,0,4) == 'http') ? $image : "images/$image"; |
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
Eclipse Commands | |
ctrl+shift+o | Organize packages import | |
alt+shift+j | Add a Javadoc comment | |
ctrl+alt+down | Duplicate selected line of code | |
alt+up | Move current line up |
NewerOlder