Skip to content

Instantly share code, notes, and snippets.

View alexanderfrankel's full-sized avatar

Alexander Frankel alexanderfrankel

  • New York, New York
View GitHub Profile
@alexanderfrankel
alexanderfrankel / testing-in-karma-my-controller-spec.js
Last active December 28, 2015 20:53
testing-in-karma-my-controller-spec.js
// contoller test
// spec/controllers/my-controller.js
describe('MyController', function() {
// define some variables
var scope, httpBackend, myController;
// load in our app
beforeEach(module('MyApp'));
@alexanderfrankel
alexanderfrankel / gist:cb8eae6b601fb85a3d2f
Created December 28, 2015 20:40
testing-in-karma-my-controller.js
// This is the controller definition
// my-controller.js
var myApp = angular.module('myApp', []);
myApp.controller('MyController', ['$scope', '$http', function($scope, $http) {
$scope.grades = ['first', 'second', 'third']
$scope.selectedGrade = null;
$scope.selectedStudents = [];
$scope.allStudents = [];
@alexanderfrankel
alexanderfrankel / karma.conf.js
Last active December 28, 2015 20:53
karma.conf.js
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
// frameworks to use
frameworks: ['mocha'],
},
.7
. .M
. . .N
M. ..O
=. .. .M
N . . .N
O.. . . O
MN:. . M
OM...N
N .OM .NM8MMMMMM
#box1 {
background-color: blue;
height: 100px;
margin: 0;
width: 100px;
position: absolute;
top: 0;
left: 0;
}
#box1 {
background-color: blue;
height: 100px;
margin: 0;
width: 100px;
}
#box2 {
background-color: yellow;
height: 100px;
@alexanderfrankel
alexanderfrankel / jquery_example.html
Last active August 29, 2015 13:58 — forked from dbc-challenges/jquery_example.html
Intro to jQuery for Phase 0
<!DOCTYPE html>
<html>
<head>
<title>DOM manipulation with jQuery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery_intro.js"></script>
</head>
@alexanderfrankel
alexanderfrankel / 0.2.1-boggle_class_from_methods.rb
Last active August 29, 2015 13:56 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1boggle class challenge
class BoggleBoard
def initialize(grid)
@grid = grid
end
def create_word(*coords)
coords.map { |coord| @grid[coord.first][coord.last]}.join("")
end
@alexanderfrankel
alexanderfrankel / 0.2.1-boggle_class_from_methods.rb
Created February 24, 2014 19:10 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
#your code here
end
dice_grid = [["b", "r", "a", "e"],
["i", "o", "d", "t"],
["e", "c", "l", "r"],