Skip to content

Instantly share code, notes, and snippets.

View excid3's full-sized avatar
:shipit:
Shipping

Chris Oliver excid3

:shipit:
Shipping
View GitHub Profile
---
kind: software
features:
- iosUniversal
supportedDevices:
- iPadFourthGen
- iPadMini4G
- iPadFourthGen4G
- iPhone5s
- iPad23G

I love teaching people how to share their ideas with the world. If you need to convince people about your way of thinking, you have to sell anything, or you need to raise donations, then I encourage you to sign up for this course.

I will teach you how to confidently stand before any audience and be the presenter you have always wanted to be.

@excid3
excid3 / index.html.erb
Created May 12, 2014 01:21
New simple_calendar examples for 1.0
<%# Set the beginning_of_week %>
<%= Date.beginning_of_week = :sunday %>
<%= month_calendar do |day| %>
<%= day %>
<% end %>
<hr />
<%= week_calendar params[:day], number_of_weeks: 2 do |day| %>
require "linefit"
require "time"
class Forecast
attr_accessor :counts, :dates, :intercept, :slope
def initialize(counts, dates)
@counts = counts
@dates = dates
# $ rails new searchapp --skip --skip-bundle --template https://raw.github.com/elasticsearch/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/03-complex.rb
# (See: 01-basic.rb, 02-pretty.rb)
append_to_file 'README.rdoc', <<-README
== [3] Expert
The `expert` template changes to a complex database schema with model relationships: article belongs
to a category, has many authors and comments.
weather = data['data']
location = weather['nearest_area'][0]['areaName'][0]['value']
current_condition = weather['current_condition'][0]
time = current_condition['localObsDateTime']
description = current_condition['weatherDesc'][0]['value']
return "Current Weather in #{location} as of #{time} - #{current_condition}"
# ... and so on
<?xml version="1.0" encoding="UTF-8"?>
<feed>
<header>
<id>1</id>
<last_modified>2014-07-20 18:52:55 UTC</last_modified>
</header>
<future>
<entry>
<id>1</id>
<date>2014-07-31 18:30:00 UTC</date>
@excid3
excid3 / wistia.js.coffee
Created January 3, 2015 16:34
wistia oembed
class WistiaEmbed
constructor: (original_tag) ->
@base_url = "//fast.wistia.com/oembed/?url="
@account_url = encodeURIComponent("https://home.wistia.com/medias/")
@original_tag = original_tag
@media_id = original_tag.data("wistia-id")
inject: ->
$.getJSON("#{@base_url}#{@account_url}#{@media_id}&format=json&embedType=seo&videoFoam=true&controlsVisibleOnLoad&callback=?", @parse)
class RepliesController < ApplicationController
require "time"
skip_before_filter :verify_authenticity_token
skip_before_filter :authenticate_teacher!
def receive
# 1. set a @parent based on phone number and/or course number if they exist
# 2/ you then move on to the next state on the parent
@reply = Reply.new
require "open-uri"
RUBYGEMS_VERSIONS = {
"1.8" => {
"url" => "https://github.com/rubygems/rubygems/releases/download/v1.8.30/rubygems-update-1.8.30.gem",
"filename" => "rubygems-update-1.8.30.gem"
},
"2.0" => {
"url" => "https://github.com/rubygems/rubygems/releases/download/v2.0.15/rubygems-update-2.0.15.gem",
"filename" => "rubygems-update-2.0.15.gem"