Skip to content

Instantly share code, notes, and snippets.

View cnocon's full-sized avatar
:octocat:
Professionally developing

Cristin O'Connor cnocon

:octocat:
Professionally developing
View GitHub Profile
@cnocon
cnocon / styleset.js
Created December 11, 2013 15:04
styleSet object
var styleSet = {
boxShadow: "0 1px 3px rgba(0,0,0,0.5)",
textShadow: "1px 1px #000",
backgroundColor: "lightBlue",
padding: "1em",
margin: "2em 0"
}
@cnocon
cnocon / section_elements.html
Created December 11, 2013 15:04
html for blog post
<!DOCTYPE html>
<html>
<head>
<title>Looping in Javascript</title>
<script async src="blogpost.js"></script>
</head>
<body>
<section>
<h2>Here is our 1st section element.</h2>
</section>
@cnocon
cnocon / loop.js
Last active December 31, 2015 01:09
wrong!
window.onload= function(){
var styleSet = {
boxShadow: "0 1px 3px rgba(0,0,0,0.5)",
textShadow: "1px 1px #000",
backgroundColor: "lightBlue",
padding: "1em",
margin: "2em 0"
}
@cnocon
cnocon / pig_latin.rb
Created January 8, 2014 22:32
pig latin
def pig_latin(word)
if !!(word =~ /\s/)
split_sentence = word.split(' ').map {|w| w.split(//)}
translate_sentence(split_sentence)
else
split_word = word.split(//)
translate_single_word(split_word)
end
end
class Car
@@WHEELS = 4
def initialize(args)
@color = args[:color]
@wheels = @@WHEELS
end
def drive
@status = :driving
end
def brake

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
@cnocon
cnocon / zoo.js
Created February 27, 2014 16:29 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------
@cnocon
cnocon / zoo.js
Created February 27, 2014 17:16 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------------
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work.
//------------------------------------------------------------------------------------------------------------------