Skip to content

Instantly share code, notes, and snippets.

View seancdavis's full-sized avatar

Sean C Davis seancdavis

View GitHub Profile
@seancdavis
seancdavis / head-link.html
Last active May 30, 2017 18:49
Multiple CSS Imports
@seancdavis
seancdavis / base.rb
Created June 24, 2017 12:48
Load all modules within a namespaced directory
module Utils::All
# I wrote this originally for model concerns, in which case I needed
# the following line to be included:
# extend ActiveSupport::Concern
Dir.glob(File.expand_path('../', __FILE__) + '/*.rb').each do |util|
next if File.basename(util) == 'base.rb'
include "Utils::#{File.basename(util, '.rb').camelize}".constantize
end
end
@seancdavis
seancdavis / script.rb
Last active January 6, 2023 08:21
Move files up one directory in Ruby
require 'fileutils'
path = File.expand_path('../', __FILE__)
Dir.glob("#{path}/**/*.*").each do |file|
new_path = "#{path}/#{file.split('/')[-1]}"
FileUtils.mv(file, new_path)
end
<!-- ID: 881 -->
<div class="container-fluid sticky-top">
<div class="row">
<a href="javascript:void(0)" class="btn btn-live-schedule-trigger hidden-xs" data-smooth-scroll-to="live-stream-schedule"
data-smooth-scroll-offset="92" data-track-click="liveSeeScheduleClicked">
<span>See Schedule</span>
<svg class="icon icon-1" viewbox="0 0 256 256">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/assets/svgs/icons.svg#chevron-down"></use>
</svg>