Skip to content

Instantly share code, notes, and snippets.

View shushugah's full-sized avatar
:octocat:
Why is GitHub supporting a child separation agency?

yonatan miller shushugah

:octocat:
Why is GitHub supporting a child separation agency?
View GitHub Profile
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!
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!
@shushugah
shushugah / gist:736a1dbe5ed5e4845a17
Created July 8, 2014 21:24
JSONified version of MTA Status Service XML file
{
"service": {
"responsecode": "0",
"timestamp": "7/8/2014 5:21:01 PM",
"subway": {
"line": [
{
"name": "123",
"status": "GOOD SERVICE"
},
# 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).
Rails.application.routes.draw do
resources :contacts
resources :recipients
# 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|
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
#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,
// 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.
//
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();