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
// This stub file contains items that aren't used yet; feel free to remove this module attribute | |
// to enable stricter warnings. | |
#![feature(exclusive_range_pattern)] | |
#![allow(unused)] | |
pub struct Player { | |
pub health: u32, | |
pub mana: Option<u32>, | |
pub level: u32, | |
} |
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 custom_elements($elements) { | |
$elements = custom_radio_workspaces($elements); | |
$elements = custom_radio($elements, 'custom-radio-people'); | |
$elements = custom_radio($elements, 'custom-radio-people-workspace'); | |
$elements = custom_radio($elements, 'custom-radio-person-status'); | |
$elements = custom_radio($elements, 'custom-radio-room-hours'); | |
return $elements; | |
} |
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 commanderQueue = function commanderQueue(phaseId, queuePayLoad, callback, thisArg) { | |
if(!Validator.payLoad(queuePayLoad)) { return false; } | |
var boundCallback = (callback) ? _.bind(callback, thisArg) : null; | |
var extraBindings; | |
var mustAPI = false; | |
if(queuePayLoad.type === Settings.types.ADD && boundCallback) { | |
var extraBindings = function() { | |
boundCallback.call(null, arguments[0]); |
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 _ = require('lodash'); | |
var Qualifications = require('../config/Qualifications.jsx'); // = ['GCSE', 'A Level', 'KS4', 'AS', 'KS3']; | |
var Utilities = { | |
removeQualification: function(name) { | |
var newName = ''; | |
_.forEach(Qualifications, function(quali) { | |
if(_.startsWith(name, quali)) { | |
var removeWords = _.words(quali); |
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 ImageUtilities = require('./Image.jsx'); | |
var Parse = require('url-parse'); | |
var _ = require('lodash'); | |
var Validator = require('./Validator.jsx'); | |
var VideoConfig = require('../config/modules/video/Video.jsx'); | |
/** | |
* could do with a proper class, with proper constructors |
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
factory('App\Models\User', 50)->create()->each(function($u) { | |
$u->posts()->save(factory('App\Models\User')->make()); | |
}); |
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 admin_real_preview($query) { | |
$allowedRoles = array( | |
'contributor', | |
'administrator' | |
); | |
$currentUser = wp_get_current_user(); | |
$matchingRoles = array_intersect($allowedRoles, $currentUser->roles); |
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
// ---- | |
// libsass (v3.1.0-beta) | |
// ---- | |
@import "sass-list-maps"; | |
$colour-primary: #293A4B; | |
$colour-secondary: #FF8600; | |
$colour-inactive: #AAAAAA; |