Skip to content

Instantly share code, notes, and snippets.

View joebrislin's full-sized avatar

Joe Brislin joebrislin

View GitHub Profile
@joebrislin
joebrislin / contact.html.erb
Last active February 24, 2016 15:18
Code Samples -Marketing Website Contact Page (Ruby on Rails / Refinery)
<%= render 'refinery/shared/header_full_width_title' %>
<div class="row wow fadeInUp" data-wow-duration="2s" data-wow-offset="20">
<div class="col-sm-6">
<%= raw @page.content_for(:body) %>
</div>
<div class="col-sm-6">
<%= raw Refinery::Page.find_by_path_or_id(nil, 26).content_for(:teaser) %>
</div>
</div>
@joebrislin
joebrislin / DataService.h
Last active December 10, 2015 07:33
Code Samples - Mobile Application to Evaluate Equipment TradeIns (iOS / Objective C)
//
// DataService.h
// TradeIn
//
// Created by Joe Brislin on 10/29/14.
// Copyright (c) 2014 BlueRidge Interactive. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PostEvaluation.h"
@joebrislin
joebrislin / PhotosViewController.h
Last active December 10, 2015 07:33
Code Samples - Mobile Application for Inventory Checkins (iOS / Objective C)
//
// PhotosViewController.h
// EMSCheck
//
// Created by Joe Brislin on 5/5/14.
// Copyright (c) 2014 BlueRidge Interactive. All rights reserved.
//
#import <UIKit/UIKit.h>
@joebrislin
joebrislin / explore.js
Last active December 10, 2015 07:22
Code Samples - Interactive Map displaying Videos within the State of VA (Ruby on Rails / KnockoutJS)
var map, markers, geoXml, mc;
var defaultZoom = 7;
var maxZoom = 20;
var loadModal = function(elem, evt){
evt.preventDefault();
$("#videoModal").modal({remote: $(elem).attr('href')});
};
$(".explore-index").ready( function(){
@joebrislin
joebrislin / appointment.rb
Last active April 26, 2019 14:10
Code Samples - Delayed Job Queue to send out Appointment Reminders (Twilio)
class Appointment < ActiveRecord::Base
include Rails.application.routes.url_helpers
validates :name, presence: true
validates :phone_number, presence: true
validates :time, presence: true
# After initialization, set default values
after_initialize :set_default_values
before_create :confirmation_text
@joebrislin
joebrislin / casestudies_controller.rb
Created December 10, 2015 05:54
Code Samples - Case Studies Extension for Marketing Website (Refinery CMS)
module Refinery
module Casestudies
class CasestudiesController < ::ApplicationController
layout :selectLayout
before_action :find_all_casestudies
before_action :find_page
def index
# you can use meta fields from your model instead (e.g. browser_title)
@joebrislin
joebrislin / application.cfc
Created October 17, 2012 16:26
Slatwall: Updated Delivery Confirmation utilizing orderFulfillment entity
if ( not StructKeyExists(request.context, '$') ) {
request.context.$ = application.serviceFactory.getBean('muraScope');
if ( StructKeyExists(session, 'siteid') ) {
request.context.$.init(session.siteid);
} else {
request.context.$.init('default');
};
};
@joebrislin
joebrislin / roles.cfc
Created October 3, 2012 14:38
ColdFusion ORM - Extra Column being generated in link table
component{
property name="users" fieldtype="many-to-many" cfc="users" singularname="user"
type="array" linktable="tblUsers_Roles" cascade="none"
fkcolumnid="roleID" inversejoincolumn="accountID";
}
@joebrislin
joebrislin / sample.cfc
Created October 1, 2012 22:45
Script Based CFC Component Level Annotations
/**
* @persistent false
* @extends baseController
* @output false
* @accessors true
*/
component {
property name="foo" type="string";
property name="timestamp" type="datetime";
@joebrislin
joebrislin / index.cfm
Created April 11, 2012 19:47
Secondary Navigation Generation for ColdFusion and Twitter Bootstrap
<cfoutput>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">