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
elixir(function(imix) { | |
// Workflow stuff | |
imix.sass('app.scss') | |
.coffee() | |
.phpUnit() | |
.wiredep(); | |
// Build stuff | |
if (elixir.config.production) { |
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\Bridges; | |
use ReflectionClass; | |
trait LaravelFivePackageTrait { | |
public function boot() | |
{ | |
$this->loadViewsFrom($this->namespace, $this->guessPackagePath() . '/views'); | |
$this->loadTranslationsFrom($this->namespace, $this->guessPackagePath() . '/lang'); |
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 FestivalPlaylists\Bridges; | |
use Laracasts\Flash\FlashServiceProvider as BaseFlashServiceProvider; | |
class FlashServiceProvider extends BaseFlashServiceProvider { | |
var $namespace = 'flash'; | |
var $vendor = 'laracasts'; | |
use LaravelFivePackageTrait; |
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 db_query($query) | |
{ | |
$result = mysql_query($query) or sql_error($query); | |
return $result; | |
} | |
function sql_error($query) | |
{ | |
$message = "DATABASE ERROR \n QUERY: $query \n ERROR: " . mysql_error(); | |
$out = '<hr><strong>DATABASE ERROR</strong><hr><pre><p><div><em>The query was</em> : </div><div>' . htmlentities($query) . '</div></p><p><div><em>MySQL Said</em> : </div><div>' . mysql_error() . '</div></p></pre><hr>'; |
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
angular.module('stateMock',[]); | |
angular.module('stateMock').service("$state", function($q){ | |
this.expectedTransitions = []; | |
this.current = {}; | |
this.transitionTo = function(stateName){ | |
if(this.expectedTransitions.length > 0){ | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName){ | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} |
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
faker.seed(100); |
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 frozen = 153665219; // Grab this value from a previous build | |
var seed = 1 ? frozen : (new Date).getTime() % 1000000000; // change 1 to 0 to switch between random or frozen | |
console.log("This seed is " + seed); | |
faker.seed(seed); |
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
<li> | |
<a href="#"> | |
<img src="{{image.image(280, 160, true)}}" width="280" height="160" /> | |
<div class="caption"> | |
<i class="pe-7s-{{helpers.randomize(['news-paper', 'global', 'science'])}} pe-3x"></i> | |
<div> | |
<strong>{{name.findName}}</strong><br /> | |
<span>{{random.number(31)}} {{date.month}} {{random.number({min: 2000, max: 2015})}}</span> | |
</div> | |
</div> |
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 gulpFaker = map(function(code, filename) { | |
return faker.fake(code.toString()); | |
}); | |
gulp.src(['html/*.html']) | |
.pipe($.plumber()) | |
.pipe($.fileInclude()) | |
.pipe(gulpFaker) | |
.pipe(gulp.dest('.')); |
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
<div class="news-center-articles"> | |
<ul> | |
@@include('./partials/article-thumb.html') | |
@@include('./partials/article-thumb.html') | |
@@include('./partials/article-thumb.html') | |
@@include('./partials/article-thumb.html') | |
@@include('./partials/article-thumb.html') | |
@@include('./partials/article-thumb.html') | |
</ul> | |
<a class="news-center-read-more" href="#">Read More</a> |