Skip to content

Instantly share code, notes, and snippets.

View jrthib's full-sized avatar
🎸

Joseph Thibeault jrthib

🎸
View GitHub Profile
<?php
/**
* Page Template
*
* …
*
* @package Thematic
* @subpackage Templates
*/
@jrthib
jrthib / gist:6150941
Last active December 20, 2015 14:59
Setting the body class to whichever element is clicked
$('.nav li a').click(function() {
// remove the extra classes before adding the current clicked class
$('.nav li a').each(function(i, el) { // iterate through all of the menu items
// get the current elements class
var removeClass = $(el).attr('class');
// remove it from the body, if it has the class.
if($('body').hasClass(removeClass)) $('body').removeClass(removeClass);
});
$('.bxslider').bxSlider({
pagerCustom: '#bx-pager',
mode: 'horizontal',
startSlide: 0,
controls: 'false',
onSlideAfter: function($slideElement, oldIndex, newIndex) {
var newClass = $slideElement.attr('class');
var oldClass = $('.bxslider li')[oldIndex].attr('class');
@jrthib
jrthib / gist:6597718
Created September 17, 2013 17:34
Sample NodeJS App Config
module.exports = {
development: {
root: require('path').normalize(__dirname + '/..'),
app: {
name: 'AppName Development',
nodefly: 'AppName Dev',
iosversion: "2.0.0",
androidversion: "0.6.0"
},
db: 'mongodb://localhost/appdev',
@jrthib
jrthib / gist:6597754
Last active December 23, 2015 06:59
Sample server.js
// Load configurations
var env = process.env.NODE_ENV || 'development'
, config = require('./config/config')[env];
// Bootstrap db connection
mongoose.connect(config.db);
relations.use(relations.stores.redis, {client: redis.createClient(config.redis.port, config.redis.host)});
// Setup App Version
@jrthib
jrthib / gruntFile.js
Created October 1, 2013 01:56
Sample GruntFile
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-karma');
<div id="ourServicesMenu" class="submenu">
<ul>
<li class="title"><a href="/our-services/bariatrics/">Bariatrics</a></li>
<li><a href="/our-services/bariatrics/">Overview</a></li>
<li><a href="/our-services/bariatrics/our-physicians/">Our Physicians</a></li>
<li><a href="/our-services/bariatrics/technology-procedures/">Technology &amp; Procedures</a></li>
<li><a href="/our-services/bariatrics/departments-services/">Departments &amp; Services</a></li>
<li><a href="/our-services/bariatrics/programs-classes/">Programs &amp; Classes</a></li>
<li><a href="/our-services/bariatrics/resources-tools/">Resources &amp; Tools</a></li>
<li><a href="/our-services/bariatrics/patient-stories/">Patient Stories</a></li>
@jrthib
jrthib / UConnHuskyLogoASCII
Created October 25, 2013 14:56
UConn Husky Dog Logo ASCII Art
..+ .:.
..+8N+. .+$8+.
.++NNNN+=. .,+NNNN++..
+7NNNNNN?+. ...+NNNNNNN+.
..+NNNN..NNN++. .,+NNN...NNN+.
. +DNN.....NNN+.. .+NNN ...NNN+.
..+DNN ..N7. NNN+. +NNN. .NN..NNN+.
++NN..:NNN .NN?+ .:?NN. .NNNO..NN7+
#wpcf7-f492-p493-o1 span.wpcf7-list-item {
display:block;
}
@jrthib
jrthib / header.php
Last active January 4, 2016 19:49
UConn WP Banner example for fixed navigation.
<body>
<div class="l-canvas type_wide col_cont headerpos_fixed">
<div class="l-canvas-h">
<div class="l-header type_fixed">
<?php do_action('uconn_banner'); ?>
</div>
</div>
<div class="l-header-h">
<!— everything else for the header —>
</div>