Skip to content

Instantly share code, notes, and snippets.

RailsBridge Workshop

What is RailsBridge?

RailsBridge is a non-profit organization who aims to expose under-represented groups in technology to programming using Ruby on Rails. RailsBridge is part of a parent organization, Bridge Foundry, who manages the overall vision of the organization. There are many other Bridges like GoBridge, ClojureBridge, JSBridge and ElixirBridge.

How will this work?

Teams of 4-5 people will work together with a coach on a guided project. The coaches will follow along with the team to ensure everyone is progressing along and stop for discussion points along the way.

After our time together is coming to a close, we will de-brief (around 3:30pm) to discuss what we have learned as well as provide additional recommendations and resources to assist you in taking your projects and learning to the next level.

# define class
class Planet
attr_accessor :name, :pop_by, :avg_temp, :color, :rate_solar_rotation, :distance_from_sun, :planets, :add_planet, :print_planets
def initialize(name, pop_by, avg_temp, color)
@name = name.capitalize
@pop_by = pop_by
@avg_temp = avg_temp
@color = color
end
@kariabancroft
kariabancroft / battleship.js
Created August 31, 2015 16:27
Basic JS implementation of a little battleship
$(document).ready(function(){
/* Stores the board info
0 for empty
1 for ship
X when hit
*/
var board = [];
// Stores the locations of the ships
class User < ActiveRecord::Base
validates :email, :username, :uid, :provider, presence: true
def self.find_or_create_from_omniauth(auth_hash)
# Find or create a user
auth_email = auth_hash[:info]? auth_hash[:info][:email] : nil
if !auth_email.nil?
user = self.find_by(email: auth_email)
if user.nil?
return self.create_from_omniauth(auth_hash)
@kariabancroft
kariabancroft / db_create.rb
Last active August 29, 2015 14:22
Database Creation
require "sqlite3"
db = SQLite3::Database.new "test.db"
db.execute "CREATE TABLE posts
(id INTEGER PRIMARY KEY, title TEXT NOT NULL);"
db.close if db
@kariabancroft
kariabancroft / dabblet.css
Last active October 28, 2015 17:54 — forked from anonymous/dabblet.css
Untitled
body {
font-family: courier, serif;
font-size: 14px;
padding: 50px;
}
div {
background: #a6adbd;
margin: 0 auto;
width: 600px;
@kariabancroft
kariabancroft / dabblet.css
Last active January 17, 2016 21:34 — forked from zoerooney/dabblet.css
Flamingo Sample
/**
* Flamingo Sample
*/
body {
font-family: sans-serif;
font-size: 14px;
padding: 50px;
background: #333;
}