Skip to content

Instantly share code, notes, and snippets.

View FyerPower's full-sized avatar
⌨️
is busy coding

Michael Lynch FyerPower

⌨️
is busy coding
  • Cincinnati, Ohio
  • 16:35 (UTC -04:00)
View GitHub Profile
@FyerPower
FyerPower / info.md
Last active October 3, 2025 13:58
Initial Setup (WSL / OhMyZSH)

Install Ubuntu 24.04 on Windows Subsystem for Linux (WSL)

wsl --install Ubuntu-24.04

Install and Configure Zsh with Oh My Zsh on Ubuntu 24.04

# Update package lists
sudo apt update
# Install zsh
@FyerPower
FyerPower / course.rb
Created February 2, 2015 05:35
This is a Ruby on Rails model code segment recently written for Top Gun Performance Solutions. In this Model you can look at a basic implementation of Solr searching using the SunSpot gem.
class Lms::Course < ActiveRecord::Base
validates :title, :description, presence: true
# Lessons & Snippets
has_many :course_lessons
has_many :lessons, through: :course_lessons
has_many :snippets, through: :lessons
# Author, Level, Imagery, Audiences, Categories, Resources, Paths, and Programs
belongs_to :author, class_name: "User", foreign_key: "author_id"
@FyerPower
FyerPower / path_controller.rb
Last active August 29, 2015 14:14
This is a Ruby on Rails controller code segment recently written for a new feature being added to a Learning Management System for Top Gun Performance Solutions
class Api::V1::Lms::PathsController < ApplicationController
before_filter :authenticate_user!
before_filter :find_path, only: [:show, :update, :destroy]
before_filter :authorize_action
respond_to :json
def index
@paths = ::Lms::Path.all
end
@FyerPower
FyerPower / Path.rb
Created February 2, 2015 05:26
This is a Ruby on Rails model code segment recently written for a new feature being added to a Learning Management System for Top Gun Performance Solutions
class Lms::Path < ActiveRecord::Base
validates :name, :description, presence: true
validates :name, uniqueness: true
# Associations
has_and_belongs_to_many :courses
belongs_to :imagery
def get_progress(user)
return 0 if courses.length == 0
@FyerPower
FyerPower / path_edit.coffee
Created February 2, 2015 05:23
This is a javascript code segment (written in coffeescript) that was just written this past week for a new feature being added to a Learning Management System for Top Gun Performance Solutions
'use strict'
angular.module('app.lms').controller 'PathEditAdminCtrl', ['$state', 'path', 'Path', 'Course', 'Modal',
($state, path, Path, Course, Modal) ->
vm = this
vm.path = path
vm.errors = []
vm.newCourse = {id: null, label: null}
vm.editName = false