Skip to content

Instantly share code, notes, and snippets.

@csessig86
csessig86 / ver.html
Created August 17, 2016 22:10
Add ?ver
<script src="/js/scripts-combined.js?ver=5"></script>
@csessig86
csessig86 / immunization-rates.html
Last active August 16, 2016 16:45
Immunization rates embed
<div class="left">
<h3>
<a href="http://thegazette.com/data/ia-immunization-rates" target="_blank">
Database: Immunization rates for schools near you
</a>
</h3>
<a href="http://thegazette.com/data/ia-immunization-rates" target="_blank">
<img style="width: 100%;" src="http://thegazette.com/Includes/data/projects/ia-immunization-rates/ss.jpg" alt="">
</a>
<p class="embed-subhead">
@csessig86
csessig86 / boomtrain.js
Last active August 9, 2016 13:08
Boomtrain post
$.ajax({
type: "POST",
url: 'https://boomtrain.auth0.com/oauth/ro',
data: {
"client_id": "FP3iP1blgJbdmmSRYS1I96byb1nXryTs",
"username": "chrise@fusionfarm.com",
"password": "gazboom131",
"connection": "Username-Password-Authentication",
"scope": "openid app_metadata name email user_id",
"grant_type": "password"
@csessig86
csessig86 / itemprop-location.rb
Created August 8, 2016 20:02
Itemprop location
.location{itemprop: "location"}
=fa_icon "map-marker", class: "fa-secondary"
%span{itemprop: "location"}
=event.location.city unless event.location.city.blank?
@csessig86
csessig86 / position-relative.css
Created August 5, 2016 16:37
Container relative
body div.container {
//This is causing some weird scrolling on certain pages. Let's only apply it where we absolutely need it.
//min-height:100%;
position:relative;
}
@csessig86
csessig86 / start-end-time.rb
Created August 2, 2016 21:30
If, else start time
if params[:event][:start_time_time].to_time >= params[:event][:end_time_time].to_time
@event = Event.new(event_params)
@event.errors[:base] << "The end time must be after the start time."
else
@csessig86
csessig86 / time-splitter.rb
Created August 1, 2016 16:58
Time splitter init with current time zone
extend TimeSplitter::Accessors
split_accessor :start_time, default: ->{Time.zone.parse('00:00:00')}
split_accessor :end_time, default: ->{Time.zone.parse('00:00:00')}
@csessig86
csessig86 / date-picker.js
Last active August 1, 2016 16:39
Initialize Materialize date picker
var $input_one = $('#input-calendar-1 .datepicker').pickadate({
'options_go_here': 'text'
});
var picker_one = $input_one.pickadate('picker');
@csessig86
csessig86 / hoopla-quiz-1.haml
Last active July 5, 2016 22:35
Hoopla quiz module 1
%ul.quiz-submit{:data => {:topic => "Category"}}
-@related_events.each do |e|
= render "events/event_result", event: e
%li.square.module.survey
%p
%strong Which type of event category do you prefer?
.btn-container
%button.answer-btn.btn-large.link
=fa_icon('compass')
%span.text
@csessig86
csessig86 / top-paid-doctors.html
Created July 1, 2016 20:36
Top paid doctors embed
<div class="left">
<h3><a href="http://thegazette.com/data/top-paid-doctors" target="_blank">Highest paid doctors in Iowa</a></h3>
<a href="http://thegazette.com/data/top-paid-doctors" target="_blank"><img style="width: 100%;" src="http://thegazette.com/Includes/data/projects/top-paid-doctors/ss.jpg" alt=""></a>
<p class="embed-subhead">Click to find out if your doctor is among the highest paid doctors in Iowa.</p>
</div>