Skip to content

Instantly share code, notes, and snippets.

{
"curriculum": [
{
"id": "351",
"usr_created": "curr_bcas",
"dttm_created": "2012-09-26 13:05:04",
"usr_last_modified": "curr_bcas",
"dttm_last_modified": "2012-09-27 13:58:43",
"usr_submitted": null,
"dttm_submitted": null,
@bradrice
bradrice / curriculum_course_other.php
Created October 1, 2012 18:06
curriculum_course_other
public function get_curriculum_course_other_details($curriculumID)
{
return $this->db
->select('a.*,c.name as "className",b.name as "title"')
->from('curr_courses a')
->join('other_courses b', 'a.class = b.id', 'left')
->join('other_depts c','b.other_dept_id = c.id', 'left')
->where('a.curriculum_id', $curriculumID)
->where('a.flag_other', 1)
->order_by('a.year asc, a.term asc')
@bradrice
bradrice / filter colon
Created July 8, 2013 18:26
replace the colon with unicode
if(searchVal.match(/:/g)){
n = searchVal.replace(':', '\\x3A');
$scope.searchObj['filterText'] = n;
} else {
$scope.searchObj['filterText'] = searchVal;
}
@bradrice
bradrice / gist:9625254
Created March 18, 2014 17:43
jquery validator overides for bootstrap 3`
// override jquery validate plugin defaults
$.validator.setDefaults({
highlight: function(element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function(element) {
$(element).closest('.form-group').removeClass('has-error');
},
errorElement: 'span',
errorClass: 'help-block',
@bradrice
bradrice / dotcms_categories
Created March 19, 2014 13:32
Pull list of categories from widget code
#foreach($inode in $carouselCategory)
#if($velocityCount == 1)
#set($catlist = "categories:$categories.getCategoryByInode($inode).getCategoryVelocityVarName()")
#else
#set($catlist = "$catlist categories:$categories.getCategoryByInode($inode).getCategoryVelocityVarName()")
#end
#end
@bradrice
bradrice / home_scroller
Created March 28, 2014 13:17
Home scroller velocity code
#set($query = "+structureName:homeScroller +(conhost:5ce88b4e-45bc-4870-bd1e-3cb8399a11a1 conhost:SYSTEM_HOST) +homeScroller.active:1")
#set($list = $dotcontent.pull($query, '0', 'homeScroller.weightedOrder desc'))
<script type="text/javascript">
// execute your scripts when DOM is ready. this is a good habit
jQuery(function() {
// initialize scrollable
jQuery("div.scrollable").scrollable(
{
@bradrice
bradrice / gist:465e1d82abd5619b70b8
Created September 23, 2014 20:27
Markdown vim-template for Pelican
Date: %FDATE%
Author: Brad Rice
Email: [email protected]
Title: %HERE%
Slug:
Tags:
Category:
@bradrice
bradrice / new_gist_file.sql
Last active November 2, 2018 12:43
reset increment on sql table #sql
ALTER TABLE tablename AUTO_INCREMENT = 1
<script type="application/ld+json">
{ "@context" : "http://schema.org",
"@type" : "Organization",
"name" : "The University of Akron",
"url" : "http://www.uakron.edu",
"sameAs" : [ "https://www.facebook.com/UniversityofAkron",
"https://www.linkedin.com/edu/school?id=19136",
"https://twitter.com/uakron",
"http://instagram.com/uakron",
"https://www.youtube.com/uakron"],
@bradrice
bradrice / SassMeister-input.scss
Created March 11, 2015 12:55
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@mixin family($size){
font-size: $size;
@if $size <= 16px {
font-family: Arial, sans-serif;
} @else if $size <= 24px {