Skip to content

Instantly share code, notes, and snippets.

View martinjoiner's full-sized avatar

Martin Joiner martinjoiner

View GitHub Profile
gulp.watch ('css/**/*.css', function(e){
// Only new or renamed
if(e.type !== 'deleted'){
gulp.start('inject');
}
});
@martinjoiner
martinjoiner / Super-Tricky-Code-Challenge.php
Last active December 13, 2025 17:20
Super Tricky Code Challenge
<?php
/**
* Fix the code: Add, Remove or Change 1 character to make this code print 3 pound signs "£££"
* Here's the broken code that will run forever (do NOT uncomment this and run it!)...
*/
//$n = 3;
//for( $i = 0; $i < $n; $i-- ){
// print "&pound;";
//}
// rotateByN() moves a chunk of an array from the start to the end
Array.prototype.rotateByN = function(n) {
var arrReturn = [],
i,
iLimit = this.length;
// Add everything above n
for( i = n; i < iLimit; i++){
arrReturn.push( this[i] );