This file contains hidden or 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
$color: chris; | |
a{ | |
color: $color; | |
} |
This file contains hidden or 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 User < ActiveRecord::Base | |
def restauraunts | |
if self.age > 20 | |
Restauraunt.all | |
else | |
Restauraunt.where( serves_alcohol: false ) | |
end | |
end | |
end |
This file contains hidden or 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
$color: blue; | |
a{ | |
color: $color; | |
} |
This file contains hidden or 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
ActiveRecord::Migration.class_eval do | |
create_table :posts do |t| | |
t.string :title | |
t.text :body | |
end | |
end |
This file contains hidden or 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
require 'pry' | |
f = File.new("potter.csv", "r") | |
characters = [] | |
f.each_line do |line| | |
each_character = line.chomp.split(",") | |
# binding.pry |
This file contains hidden or 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
a{ | |
background:rgb(random(100), random(100), random(100)); | |
} | |
$string:(); | |
@for $i from 1 through 100 { | |
$line: $i+px $i+px rgb(random(100), random(100), random(100)); |
This file contains hidden or 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
# for i in 1..3 do | |
# puts ". " | |
# sleep 1 | |
# end | |
# 3.times do | |
# puts ". " | |
# sleep 1 | |
# end |
This file contains hidden or 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
users = [ | |
'Jesse', | |
'Sean', | |
'Mikael' | |
] | |
#p users[2] | |
#p users | |
#users[0] = "Adam" | |
# users << " Regina" |
This file contains hidden or 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
puts "weclome! please choose 1 or 2." | |
choice = gets.chomp | |
if choice == "1" | |
puts "thanks! :) you chose 1" | |
elsif choice == "2" | |
puts "thanks! you chose 2" | |
else | |
puts "you didn't follow the rules" | |
end |
This file contains hidden or 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
@for $i from 1 through 80{ | |
@media all and ( min-width: #{$i}em ){ | |
body{ | |
@if $i == 1{ | |
height:100%; | |
border-style:solid; | |
border-color:hotpink | |
} | |
border-width: #{$i}px; |