Skip to content

Instantly share code, notes, and snippets.

View mattsimpson's full-sized avatar

Matt Simpson mattsimpson

View GitHub Profile
@mattsimpson
mattsimpson / example.md
Last active November 8, 2016 23:39
An example of the documentation.
  1. SSH into server and sudo to root:
ssh service@university.edu
sudo -s
  1. Change the SELINUX variable in /etc/selinux/config to permissive to prevent unforeseen and difficult to diagnose issues:
SELINUX=permissive
  1. Add the following lines to /etc/hosts file:
@mattsimpson
mattsimpson / php.ini
Last active November 20, 2015 17:46
This is what you should see in php.ini.
display_errors = On
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
@mattsimpson
mattsimpson / gist:6307053352709dacc509
Created June 16, 2015 17:31
navigation_primary.tpl
<div class="navbar-inner">
<ul class="nav navbar-nav">
{foreach from=$site_primary_navigation key=key item=menu_item name=navigation}
{assign var="ctr" value=$ctr+1}
{if $ctr <= 100}
<li{if $menu_item.link_selected} class="active"{/if}>
<a href="{$site_community_relative}{$menu_item.link_url}"{if $menu_item.link_new_window} target="_blank"{/if}>{$menu_item.link_title}</a>
</li>
{/if}
{/foreach}
@mattsimpson
mattsimpson / gist:cc38248220c22ff29a12
Created June 10, 2015 02:01
Enabling Panopto community module in all program websites.
INSERT INTO `community_modules` SELECT NULL, a.`community_id`, 9, 1
FROM `communities` AS a
LEFT JOIN `community_modules` AS b
ON a.`community_id` = b.`community_id`
AND b.`module_id` = '9'
WHERE a.`category_id` = '5'
AND b.`module_id` IS NULL;
@mattsimpson
mattsimpson / gist:614fdfa84e6210f7441a
Created June 9, 2015 21:28
Inserting active, enroled, program participants into the corresponding program community website.
INSERT INTO `community_members` SELECT NULL, a.`community_id`, e.`proxy_id`, 1, UNIX_TIMESTAMP(), 0
FROM `communities` AS a
JOIN `community_courses` AS b
ON a.`community_id` = b.`community_id`
JOIN `courses` AS c
ON b.`course_id` = c.`course_id`
JOIN `course_audience` AS d
ON c.`course_id` = d.`course_id`
JOIN `group_members` AS e
ON e.`group_id` = d.`audience_value`
// My Form Radio Button
$this->addElement('radio', 'correctAnswer', array(
'decorators' => $this->elementDecorators,
'multiOptions' => array(
'0' => 'Correct Answer',
'1' => 'Correct Answer',
'2' => 'Correct Answer',
'3' => 'Correct Answer',
),
'class' => 'segment-answer-option',
@mattsimpson
mattsimpson / docs style (bootstrap)
Last active June 23, 2018 08:42 — forked from matthiasg/docs style (bootstrap)
This is the Twitter Bootstrap documentation's callout css. Looks nice.
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
}
.bs-callout h4 {
margin-top: 0;
}