View nodemon.json
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
{ | |
"events": { | |
"start": "clear", | |
"restart": "clear" | |
}, | |
"exec": "php artisan test", | |
"ext": "*", | |
"ignore": [ | |
"vendor/" | |
] |
View this.php
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 This { | |
protected $this; | |
public function __construct () | |
{ | |
$this->this = $this; | |
} |
View validate_email.php
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 | |
function check_valid_email($email) { | |
$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; | |
if (preg_match($regex, $email)) { | |
return true; | |
} else { | |
return false; | |
} | |
} |
View TestCase.php
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 TestCase extends Illuminate\Foundation\Testing\TestCase | |
{ | |
/** | |
* The base URL to use while testing the application. | |
* | |
* @var string | |
*/ | |
protected $baseUrl = 'http://localhost'; |
View phpunit.xml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<phpunit backupGlobals="false" | |
backupStaticAttributes="false" | |
bootstrap="vendor/autoload.php" | |
colors="true" | |
convertErrorsToExceptions="true" | |
convertNoticesToExceptions="true" | |
convertWarningsToExceptions="true" | |
processIsolation="false" | |
stopOnFailure="false"> |
View object_one.js
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 Object(){ | |
} | |
Object.prototype.func = function(){ | |
//code | |
}; |
View StringToArrayWithMultipleSplitsThingy.php
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 | |
function splitAndStrip($str, $del = ',') | |
{ | |
$str = explode($del, $str); | |
for ($i=0; $i < count($str); $i++) | |
{ | |
$str[$i] = trim($str[$i]); | |
} | |
return $str; | |
} |
View roundToBaseFunction.php
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 | |
function roundToBase($value, $base = 2) | |
{ | |
$result = log($value, $base); | |
$result = ceil($result); | |
$result = pow($base, $result); | |
return $result; | |
} |
View validator.js
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
'use strict'; | |
var sr = {}; | |
sr.Validator = function(){ | |
this.errors = []; | |
this.messages = { | |
required: 'The :input: is required', | |
email: 'The :input: is not a valid email address', |
View app.php
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 | |
return array( | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Debug Mode | |
|-------------------------------------------------------------------------- | |
| | |
| When your application is in debug mode, detailed error messages with |
NewerOlder