View musical encoders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Find a teammates encoders repo ( from this lab https://github.com/flatiron-school-students/string-manipulation-bk-001) | |
2. Fork it! | |
3. Clone it! | |
4. Play with the encoder | |
5. Write a decoder | |
6. Push the decoder up to your Github repo | |
7. Post the link here! |
View musical encoders
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Find a teammates encoders repo ( from this lab https://github.com/flatiron-school-students/string-manipulation-bk-001) | |
2. Fork it! | |
3. Clone it! | |
4. Play with the encoder | |
5. Write a decoder | |
6. Push the decoder up to your Github repo | |
7. Post the link here! |
View gist:736a1dbe5ed5e4845a17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"service": { | |
"responsecode": "0", | |
"timestamp": "7/8/2014 5:21:01 PM", | |
"subway": { | |
"line": [ | |
{ | |
"name": "123", | |
"status": "GOOD SERVICE" | |
}, |
View gist:6ec3aca36c2725b5dec4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# This file is auto-generated from the current state of the database. Instead | |
# of editing this file, please use the migrations feature of Active Record to | |
# incrementally modify your database, and then regenerate this schema definition. | |
# | |
# Note that this schema.rb definition is the authoritative source for your | |
# database schema. If you need to create the application database on another | |
# system, you should be using db:schema:load, not running all the migrations | |
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
# you'll amass, the slower it'll run and the greater likelihood for issues). |
View gist:a198fcc259cdf5679ebc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.routes.draw do | |
resources :contacts | |
resources :recipients |
View gist:f99c7bec4368012b4292
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rarequire File.expand_path('../config/application', __FILE__) | |
require File.expand_path('../config/application', __FILE__) | |
Rails.application.load_tasks | |
task :text_each_alert => :environment do | |
Alert.all.each do |alert| |
View gist:100fd0a1989a42155bc9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Alert < ActiveRecord::Base | |
belongs_to :recipient | |
has_many :services | |
#make variable/method Service.find_by(name: self.service_name).traffic | |
def bad_service? | |
Service.find_by(name: self.service_name).traffic =! "GOOD SERVICE" | |
end | |
def self.current_train_status |
View gist:7619a473fcfd9992fdab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#2 models | |
class EarlyVoteSite < ActiveRecord::Base | |
has_and_belongs_to_many :locality, | |
:foreign_key => 'locality_id', :primary_key => 'p_id' | |
end | |
class Locality < ActiveRecord::Base | |
has_and_belongs_to_many :early_vote_sites, |
View events.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copygright 2016 Google Inc. All rights reserved. | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to writing, software distributed | |
// under the License is distributed on a "AS IS" BASIS, WITHOUT WARRANTIES OR | |
// CONDITIONS OF ANY KIND, either express or implied. | |
// |
View Josh.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var submit = $("button"); | |
var inputField = $("input"); | |
var menuType = $("select"); | |
var listContainer = $("#listContainer"); | |
var selectType; | |
var results; | |
submit.on('click', function(){ | |
var artistName = inputField.val(); | |
selectType = menuType.val(); |
OlderNewer