Skip to content

Instantly share code, notes, and snippets.

@shidel-dev
shidel-dev / 0.2.1-boggle_class_from_methods.rb
Last active December 27, 2015 22:39 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
def initialize(board)
@board=board
end
def create_word(*coords)
coords.map { |coord| @board[coord.first][coord.last]}.join("")
end
def get_row(row)

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.
@shidel-dev
shidel-dev / zoo.js
Last active August 29, 2015 13:56 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
Zoo = {
init: function(animals) {
this.animals = animals;
},
bipeds: function() {
@shidel-dev
shidel-dev / form-validator.js
Last active August 29, 2015 13:56 — forked from ksolo/form-validator.js
Form Validation
$(function() {
$("form[name='sign_up']").submit(function(event) {
event.preventDefault();
$("#errors").empty()
var email = validateEmail($("input[name='email']"));
var password = validatePassword($("input[name='password']"));
if (email == true) {
if (password == true) {
$("#errors").append("<ui>Success</ui>");
} else {
@shidel-dev
shidel-dev / carousel.js
Last active August 29, 2015 13:56 — forked from ksolo/carousel.js
Image Carousel
#=====bob
class Bob
hey:(words) ->
switch
when words.replace(/\s+/, '') == '' then "Fine. Be that way!"
when words == words.toUpperCase() then "Woah, chill out!"
when /\?$/.test(words) then "Sure."
else "Whatever."
module.exports = Bob

Keybase proof

I hereby claim:

  • I am shidel-dev on github.
  • I am joeshidel (https://keybase.io/joeshidel) on keybase.
  • I have a public key whose fingerprint is 753D 97CF E6EB 09D7 973B 0754 11B7 FAC2 B8D8 72AF

To claim this, I am signing this object:

(ns words)
(use 'clojure.java.io)
(defn get-lines [fname]
(with-open [r (reader fname)]
(doall (line-seq r))))
(defn divide [list]
(partition-all (/ (count list) 4) list))
Number.prototype.isCoprimeTo = function(num) {
if (this>num) var small = num, big = this;
else var small = this, big = num;
return (function(a, b) {
if (b == 0) return a;
return arguments.callee(b, a % b);
})(small, big) == 1
}
module Magic
def self.respond_to?(method_sym, include_private = false)
#Logic to decide which methods to respond to.
end
def self.method_missing(m, *args, &block)
#dynamically handle method calls
end