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
var PostIt = function(x, y, boardId) { | |
//Create post-it | |
var $div = $("<div class='post-it'><div class='header'><a href='#' id='close'>CLOSE</a></div><div class='content' contenteditable='true'></div></div>") | |
this.$element = $div; | |
var self = this; | |
function initialize() { | |
$div.draggable({ |
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
#red { | |
background-color: red; | |
width: 200px; | |
height: 200px; | |
} | |
#blue { | |
background-color: red; | |
width: 200px; | |
height: 200px; |
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
.container { | |
/* | |
If you have a block-level element of a certain width, margin: 0 auto; | |
will how you center it inside its parent container. | |
See: http://bluerobot.com/web/css/center1.html | |
*/ | |
margin: 0 auto; | |
width: 720px; | |
} |
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
worked in various groups with gist posts. completed objectivs | |
/* Here is your chance to take over Socrates! | |
Spend 10 minutes on each of the following hacks to the socrates website. | |
Enter them in the console to make sure it works and then save | |
your results here. | |
Choose a new pair for each. Add your names to the section you complete. |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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 Vehicle | |
attr_reader :color, :wheels, :status, :gas | |
def initialize(args) | |
@color = args[:color] | |
@speed = :normal | |
@wheels = nil | |
@status = :normal_speed | |
@gas = :full |
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 Array | |
def pad!(min_size, value = nil) | |
if self.count >= min_size | |
return self | |
else | |
size_is = min_size - self.count | |
count = 0 | |
while count < size_is | |
self << value | |
count += 1 |
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
def times_table(n) | |
(1..n).each do |row_num| | |
line = "" | |
(1..n).each{ |col_num| line += "#{row_num * col_num}\t"} | |
puts line | |
end | |
end | |
times_table(5) |
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
def times_table(n) | |
(1..n).each do |row_num| | |
line = "" | |
(1..n).each{ |col_num| line += "#{row_num * col_num}\t"} | |
puts line | |
end | |
end | |
times_table(5) |