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
shell: { | |
restorePlugins :{ | |
command: function () | |
{ | |
var toReturn = []; | |
var allPlugins = ["camera", "console", "device", "keyboard", "splashscreen", "statusbar", "file", "dialogs", "vibration"]; | |
var preCommand = "org.apache.cordova."; | |
toReturn.push('echo "[calvium] Restoring plugins"'); |
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
// _addNewFunc is just a function that adds this to the main DalekJS test at run-time | |
_addNewFunc("hasClass", function (__selector, __needle) | |
{ | |
// generate a random name for this element | |
var name = "hasClass-" + new Date().getTime(), | |
nameElem = "span#"+name; | |
return this.dse_self | |
.execute(function(__selector, __needle, __name) |
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
// checks if the object has that value | |
_.mixin({ | |
objHasValue: function (__obj, __key) | |
{ | |
if(!_.isNull(__obj) && !_.isNull(__key) && !_.isNull(__obj[__key]) && !_.isUndefined(__obj[__key])) | |
{ | |
return true; | |
} | |
return false; | |
} |
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
<span> | |
<div class="profile-picture-wrapper"> | |
<% if (profile.image && profile.image.file_resizable) { %> | |
<img src="<%= profile.image.file_resizable.replace('{resize_spec)', 'w_200,h_200,c_fill,g_face') %>" class="profile-panel__image img-responsive" /> | |
<% } %> | |
</div> | |
<button class="btn btn-info js__follow-user pre-icon icon-user-plus btn-short"><span>Follow</span></button> | |
<h5 class="item-view__title js__clickThrough"><div class="username-wrapper"><%= username %></div></h5> |
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
/** | |
* Check the user id is the Auth'd user id | |
* | |
* @param string $attribute | |
* @param mixed $value | |
* @return bool | |
*/ | |
protected function validateUserIdIsAuthUserId( $attribute, $value ) | |
{ | |
if($value===Auth::user()->id) |
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
// Not quite the solution, but it works so I can move on! | |
// CHANGEME: a date to test against, change it to something you want | |
var dateToTest = moment('2015-02-04 08:00:00').valueOf(); | |
// now | |
var now = moment().valueOf(); | |
// use a "greater than" eval, rather than isAfter | |
var x = dateToTest > now; |
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
# inside your homestead machine, ie. $homestead ssh | |
date | |
# Should give something like this, Wed Feb 4 16:21:30 UTC 2015 | |
# That will tell you the time. If it's off by | |
# if it's bad, to fix it. | |
exit | |
# wait | |
homestead halt |
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
// Grade | |
$grade_defaults = [ | |
'courseid' => 'factory:App\Models\Course', | |
'itemname' => $faker->sentence, | |
'itemtype' => $faker->word, | |
'score' => $faker->randomFloat(2, 0, 1), | |
'grademax' => 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
class ScoringTest extends TestCase | |
{ | |
/** | |
* Some Grades | |
*/ | |
public static function all_grades_provider() | |
{ | |
return [ | |
[100.00], | |
[50.00], |
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
class FeatureContext extends MinkContext implements Context, SnippetAcceptingContext | |
{ | |
/** | |
* @When I listen for the event :event | |
*/ | |
public function iListenForTheEvent($event) | |
{ | |
$redis = Redis::connection(); | |
$redis->set('eventHeard', false); |
OlderNewer