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
(function() { | |
var IS_DEV = true; | |
if (window.console && console.log) { | |
var oldFnLog = console.log; | |
console.log = function() { | |
IS_DEV && oldFnLog.apply(this, arguments); | |
} | |
} | |
})(); |
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
window.connStatus = { | |
_status: null, | |
waitForChange: function(_callback) { | |
this.getState(); | |
this.updateState(_callback); | |
return this; | |
}, | |
updateState: function(_callback) { | |
console.log('Init setInterval'); | |
setInterval(function() { |
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 istanbul = require('istanbul'), | |
gulp = require('gulp'), | |
istanbul = require('gulp-istanbul'); | |
gulp.task('js', function() { | |
return gulp.src('js') | |
.pipe(istanbul({ | |
includeUntested: true, | |
coverageVariable: '__coverage__' | |
})) |
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 | |
/** | |
* ImageManager.php | |
* A wrapper around GD that does multiple operations like, resizing, rotating, | |
* cropping and stuff. | |
* | |
* @author Michael Pratt <[email protected]> | |
* @version 1.0 | |
* @link http://www.michael-pratt.com/ | |
* @demo http://www.michael-pratt.com/Lab/imageManager/ |
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 | |
class Logger | |
{ | |
protected $file; | |
public function __construct($file) { $this->file = $file; } | |
public function log($message) | |
{ | |
$message = date('H:i:s ') . $message . PHP_EOL; |
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
SELECT id, nombre, (6371 * ACOS( | |
SIN(RADIANS(lat)) * SIN(RADIANS(4.6665578)) | |
+ COS(RADIANS(lng - -74.0524521)) * COS(RADIANS(lat)) | |
* COS(RADIANS(4.6665578)) | |
) | |
) AS distance | |
FROM direcciones | |
HAVING distance < 1 /* 1 KM a la redonda */ | |
ORDER BY distance ASC |
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
/* BREAKPOINTS */ | |
$break-big: "screen and (min-width:1660px)"; | |
$break-large: ""; // Default | |
$break-medium: "screen and (min-width:461px) and (max-width:768px)"; | |
$break-small: "screen and (max-width:460px)"; | |
$break-smaller: "screen and (max-width:768px)"; | |
/* MINIX */ |
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 | |
// autoload_classmap.php @generated by Composer | |
$vendorDir = dirname(dirname(__FILE__)); | |
$baseDir = dirname($vendorDir); | |
// Auto reading Class | |
$n = array(); | |
foreach (glob($vendorDir . '/my_vendor_path/*.php') as $k => $v) { |
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
isset is_null ===null ==null empty | |
null | F | T | T | T | T | | |
unset | F | T | T | T | T | | |
"" | T | F | F | T | T | | |
[] | T | F | F | T | T | | |
0 | T | F | F | T | T | | |
false | T | F | F | T | T | | |
true | T | F | F | F | F | | |
1 | T | F | F | F | F | | |
\0 | T | F | F | F | F | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/qunit/qunit-1.19.0.css" media="all" /> | |
</head> | |
<body> | |
<div class="testing"> | |
<div id="qunit"></div> |