Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Why is GitHub supporting a child separation agency?

yonatan miller shushugah

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