This file contains hidden or 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 | |
namespace Lithe\Routing; | |
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | |
class RouteServiceProvider extends ServiceProvider | |
{ | |
/** | |
* |
This file contains hidden or 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 | |
namespace Lithe\Database; | |
use Illuminate\Cache\CacheManager; | |
use Lithe\Contracts\Database\CacheInterface; | |
class Cache implements CacheInterface | |
{ | |
/** |
This file contains hidden or 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 header('Content-Type: text/plain'); | |
for($i = 1; $i <= 100; $i++) { | |
$string = ''; | |
$string .= ($i % 3) == 0 ? "fizz" : ''; | |
$string .= ($i % 5) == 0 ? "buzz" : ''; | |
print (empty($string)) ? $i : $string; | |
print PHP_EOL; | |
} |
This file contains hidden or 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 | |
$errors = []; | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
// Set required fields | |
$required = [ | |
'field_1', | |
'field_2' | |
]; |
This file contains hidden or 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 most_letters_in_a_word($string) { | |
$string = preg_replace("/[^A-Za-z]/", ' ', $string); | |
foreach(array_filter(explode(' ', $string)) as $word) { | |
$words[max(count_chars($word, 1))] = $word; | |
} | |
return $words[max(array_keys($words))]; |
This file contains hidden or 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 | |
use Lithe\Testing\TestCase; | |
class UserManagerTest extends TestCase | |
{ | |
/** | |
* | |
* @var UserManager | |
*/ |
This file contains hidden or 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
# Expire rules for static content | |
# No default expire rule. This config mirrors that of apache as outlined in the | |
# html5-boilerplate .htaccess file. However, nginx applies rules by location, | |
# the apache rules are defined by type. A consequence of this difference is that | |
# if you use no file extension in the url and serve html, with apache you get an | |
# expire time of 0s, with nginx you'd get an expire header of one month in the | |
# future (if the default expire rule is 1 month). Therefore, do not use a | |
# default expire rule with nginx unless your site is completely static | |
This file contains hidden or 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 ImplementationTest extends TestCase | |
{ | |
public function setUp() | |
{ | |
parent::setUp(); | |
$this->setUpDb(); | |
} |
This file contains hidden or 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> | |
<head> | |
<title>Theomega76| Mortgage Table with Inputs</title> | |
<meta charset="utf-8" /> | |
<!-- Move to bottom later on for better performance --> | |
<script src="js/jquery-1.11.2.js"></script> | |
</head> |
This file contains hidden or 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
import {Component} from '@angular/core'; | |
import {ROUTER_DIRECTIVES} from '@angular/router'; | |
import '../style/app.scss'; | |
import {ToasterContainerComponent, ToasterService} from 'angular2-toaster/angular2-toaster'; | |
import {MenuComponent} from './layout/menu/menu.component'; | |
import {ContentComponent} from './layout/content/content.component'; | |
import {AuthService} from "./modules/auth/auth.service"; | |
/* | |
* App Component |