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
body, html { | |
background-color: #EDEDED !important; | |
} | |
.intro { | |
text-align: center; | |
padding: 13% 0; | |
margin-bottom: 50px; | |
} |
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
<html> | |
<head> | |
<title>Materialize CSS Framework Demo</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<link type="text/css" rel="stylesheet" href="bower_components/Materialize/dist/css/materialize.min.css" media="screen,projection"/> | |
<link type="text/css" rel="stylesheet" href="style.css"> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> |
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 OriginPokemon | |
# Create a strength attribute that can be accessed on all instances | |
attr_accessor :strength | |
# `initialize` is our constructor method | |
def initialize | |
# Set strength to a default value of 100. | |
@strength = 100.0 |
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 Person | |
attr_accessor :first_name, :last_name, :gender, :age | |
def initialize(first_name, last_name, gender, age) | |
@first_name = first_name | |
@last_name = last_name | |
@gender = gender | |
@age = age | |
end |
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
max = 20 | |
number = rand(max) | |
puts "I'm thinking of a number between 1 and #{max}. Guess." | |
begin | |
answer = gets.to_i | |
difference = number - answer | |
byebug | |
if difference.abs < 3 |
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
> JSON.stringify('"hello \n world"\n this & that \r\n') | |
'"\\"hello \\n world\\"\\n this & that \\r\\n"' |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Musicdb</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= stylesheet_link_tag "https://fonts.googleapis.com/icon?family=Material+Icons" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> |
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
<!-- put this at the end of the body element --> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('.materialboxed').materialbox(); | |
}); | |
$(document).ready(function(){ | |
$('.materialboxed').materialbox(); | |
}); | |
</script> |
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
.about hr { | |
width: 40px; | |
margin-bottom: 45px; | |
} | |
.portfolio .col { | |
margin-bottom: 24px; | |
} | |
.portfolio h5 { | |
text-align: center; |
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
<div class="container portfolio"> | |
<h5>portfolio</h5> | |
<h6>MY LATEST PROJECTS</h6> | |
<hr> | |
<div class="row"> | |
<div class="col s12 m12 l12 portfolio-holder"> | |
<img class="materialboxed" | |
src="http://placehold.it/428x285"> | |
<img class="materialboxed" | |
src="http://placehold.it/428x285"> |