Skip to content

Instantly share code, notes, and snippets.

View bericp1's full-sized avatar

Brandon Phillips bericp1

View GitHub Profile
@bericp1
bericp1 / badge-redirect.php
Last active August 29, 2015 13:57
Redirect from a page template to /badge-landing if the query string is empty. Should be placed at the top of the page template, within the PHP tags, below the comment block defining the templates name and whatnot, but above `get_header()` or any other function that echos or outputs anything.
if(!isset($_SERVER['QUERY_STRING']) || trim($_SERVER['QUERY_STRING']) === ''){
header('Location: /badge-landing/');
exit;
}
combos: [
'111123',
'111132',
'111213',
'111223',
'111231',
'111232',
'111233',
'111312',
'111321',
var choices = ['1', '2', '3'],
combos = [],
_ = require('underscore');
var addLetter = function(word) {
var combos = [];
choices.forEach(function(choice) {
combos.push(word + choice);
});
return combos;
combos: [ '11123',
'11132',
'111123',
'111132',
'111213',
'111223',
'111231',
'111232',
'111233',
'111312',
var choices = ['1', '2', '3'],
combos = [],
_ = require('underscore');
var addLetter = function(word) {
var combos = [];
if(word.length >= 3) {
combos.push(word);
}
choices.forEach(function(choice) {
{
"features": [
{
"id": "0dfd06bb85bb0c7c6",
"type": "feature-speakers",
"name": "Speakers",
"icon": "69",
"sorting": "lastName",
"speakers": [
{
{
"features":[
{
"id":"57971f42c203bc0ff",
"type":"feature-schedule",
"name":"Schedule",
"icon":"13",
"settings":{
"type":"schedule-settings",
"timeFormat":"12",
{"features":[{"id":"57971f42c203bc0ff","type":"feature-schedule","name":"Schedule","icon":"13","settings":{"type":"schedule-settings","timeFormat":"12","timeZone":"US/Eastern","multiTrack":true},"sessions":[{"id":"9dcb88e0137649590","type":"schedule-session","startTime":"2015-10-27T08:30:00-0400","endTime":"2015-10-27T11:00:00-0400","title":"Mastering the North Carolina STEM Recognition Process","description":"<p>Introduces participants to the NC STEM Recognition process and provides them with practical instruction on preparing for and completing the requirements to become a recognized STEM school. Specific topics addressed in this session include:</p>\n<ul>\n<li>Defining STEM in North Carolina</li>\n<li>Understanding the 11 STEM Attributes and the Attribute Implementation Rubric</li>\n<li>Using the Implementation Rubric for self-assessment</li>\n<li>Dissecting the STEM Recognition application process</li>\n<li>Connecting to the NC STEM Center</li>\n</ul>\n<p>Participants also will hear from K-12 teachers and
{"features":[{"id":"57971f42c203bc0ff","type":"feature-schedule","name":"Schedule","icon":"13","settings":{"type":"schedule-settings","timeFormat":"12","timeZone":"US/Eastern","multiTrack":true},"sessions":[{"id":"9dcb88e0137649590","type":"schedule-session","startTime":"2015-10-27T08:30:00-0400","endTime":"2015-10-27T11:00:00-0400","title":"Mastering the North Carolina STEM Recognition Process","description":"<p>Introduces participants to the NC STEM Recognition process and provides them with practical instruction on preparing for and completing the requirements to become a recognized STEM school. Specific topics addressed in this session include:</p>\n<ul>\n<li>Defining STEM in North Carolina</li>\n<li>Understanding the 11 STEM Attributes and the Attribute Implementation Rubric</li>\n<li>Using the Implementation Rubric for self-assessment</li>\n<li>Dissecting the STEM Recognition application process</li>\n<li>Connecting to the NC STEM Center</li>\n</ul>\n<p>Participants also will hear from K-12 teachers and
private function allVisibleQuery(array $with = null) {
return $this->model->with(is_null($with) ? $this->with : $with)
->where(function($query) {
return $query->doesntHave('roles', 'or', function($q) {
return $q->whereIn('name', [config('auth.hidden_role'), config('auth.blocked_role')]);
});
});
}