View fa.sublime_snippet
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
<snippet> | |
<content><![CDATA[ | |
<i class="fa fa-fw fa-${1}"></i> | |
]]></content> | |
<tabTrigger>fa</tabTrigger> | |
<description>Font Awesome Icon</description> | |
<scope>text.blade, text.html.blade, text.html</scope> | |
</snippet> |
View $this.sublime-snippet
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
<snippet> | |
<content><![CDATA[ | |
\$this-> | |
]]></content> | |
<tabTrigger>$</tabTrigger> | |
<scope>embedding.php, meta.embedded.block.php, source.php, meta.class.php, meta.block.php, meta.function.php, meta.block.php</scope> | |
</snippet> |
View day3part2.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 | |
namespace Tests\Challenges; | |
use Tests\TestCase; | |
class DayThreeTest extends TestCase | |
{ | |
public function testFirstChallenge() | |
{ |
View day_three_part_one.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 | |
$number = 361527; | |
$bottomRoot = floor(sqrt($number)); | |
// Skip even numbers because they aren't corners. | |
if ($bottomRoot % 2 == 0) { | |
$bottomRoot = $bottomRoot-1; | |
} |
View strict_localization_lookup.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 | |
namespace Tests; | |
use Illuminate\Translation\Translator; | |
use Laravel\BrowserKitTesting\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication; |
View refactor_1.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 | |
// Refactor the following functions using your new skills from 99-bottles. | |
// Sorry about the lack of tests - bonus points if you write tests to get started. | |
function getStartDate() { | |
return preg_match("/^\d\d\d\d-\d\d-\d\d$/", $_GET['dStartDate']) ? $_GET['dStartDate'] : date("Y-m-d", time() - 60 * 60 * 24 * 7); | |
} | |
function getEndDate() { |
View refactor_1_solution.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 | |
// Before: | |
function getStartDate() { | |
return preg_match("/^\d\d\d\d-\d\d-\d\d$/", $_GET['dStartDate']) ? $_GET['dStartDate'] : date("Y-m-d", time() - 60 * 60 * 24 * 7); | |
} | |
function getEndDate() { | |
return preg_match("/^\d\d\d\d-\d\d-\d\d$/", $_GET['dEndDate']) ? $_GET['dEndDate'] : date("Y-m-d"); |
View redirect_message_macro.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 | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ |
View auth_macro_hack.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 | |
// Until SessionGuard Macros get pulled into Laravel core from a PR: | |
// Remove this when Laravel 5.4.18 is released. | |
$this->app->config->set('auth.guards.hack', [ | |
'driver' => 'modified-session', | |
'provider' => 'users', | |
]); |
View death_by_arrow_keys.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
{ | |
"title": "Death by arrow keys", | |
"rules": [ | |
{ | |
"description": "Map arrow keys to command Q", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_arrow", |
OlderNewer